forked from len0rd/rockbox
Fix rockboy for the H100's. Thanks for fixing the HW codec players Peter
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13708 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3490acbfbd
commit
a28d74e71c
3 changed files with 28 additions and 22 deletions
|
|
@ -14,7 +14,7 @@ typedef struct event_s
|
||||||
#define EV_PRESS 1
|
#define EV_PRESS 1
|
||||||
#define EV_RELEASE 2
|
#define EV_RELEASE 2
|
||||||
|
|
||||||
int ev_postevent(event_t *ev) ICODE_ATTR;
|
int ev_postevent(event_t *ev);
|
||||||
int ev_getevent(event_t *ev) ICODE_ATTR;
|
int ev_getevent(event_t *ev);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -876,6 +876,7 @@ void lcd_begin(void)
|
||||||
|
|
||||||
set_pal();
|
set_pal();
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
if(options.rotate)
|
if(options.rotate)
|
||||||
{
|
{
|
||||||
if(options.fullscreen == 0)
|
if(options.fullscreen == 0)
|
||||||
|
|
@ -894,18 +895,22 @@ void lcd_begin(void)
|
||||||
else
|
else
|
||||||
vdest=fb.ptr+S1;
|
vdest=fb.ptr+S1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
WY = R_WY;
|
WY = R_WY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
int SCALEWL IDATA_ATTR=1<<16;
|
int SCALEWL IDATA_ATTR=1<<16;
|
||||||
int SCALEWS IDATA_ATTR=1<<16;
|
int SCALEWS IDATA_ATTR=1<<16;
|
||||||
int SCALEHL IDATA_ATTR=1<<16;
|
int SCALEHL IDATA_ATTR=1<<16;
|
||||||
int SCALEHS IDATA_ATTR=1<<16;
|
int SCALEHS IDATA_ATTR=1<<16;
|
||||||
int swidth IDATA_ATTR=160;
|
int swidth IDATA_ATTR=160;
|
||||||
int sremain IDATA_ATTR=LCD_WIDTH-160;
|
int sremain IDATA_ATTR=LCD_WIDTH-160;
|
||||||
|
#endif
|
||||||
|
|
||||||
void setvidmode(void)
|
void setvidmode(void)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
switch(options.fullscreen)
|
switch(options.fullscreen)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -972,6 +977,7 @@ void setvidmode(void)
|
||||||
sremain=-(((160*SCALEWL)>>16)*LCD_WIDTH+1);
|
sremain=-(((160*SCALEWL)>>16)*LCD_WIDTH+1);
|
||||||
else
|
else
|
||||||
sremain=LCD_WIDTH-swidth;
|
sremain=LCD_WIDTH-swidth;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_refreshline(void)
|
void lcd_refreshline(void)
|
||||||
|
|
|
||||||
|
|
@ -325,14 +325,6 @@ static void do_opt_menu(void)
|
||||||
{ "On" , -1 },
|
{ "On" , -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct opt_items fullscreen[]= {
|
|
||||||
{ "Scaled", -1 },
|
|
||||||
{ "Scaled - Maintain Ratio", -1 },
|
|
||||||
#if (LCD_WIDTH>=160) && (LCD_HEIGHT>=144)
|
|
||||||
{ "Unscaled", -1 },
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct opt_items frameskip[]= {
|
static const struct opt_items frameskip[]= {
|
||||||
{ "0 Max", -1 },
|
{ "0 Max", -1 },
|
||||||
{ "1 Max", -1 },
|
{ "1 Max", -1 },
|
||||||
|
|
@ -343,7 +335,15 @@ static void do_opt_menu(void)
|
||||||
{ "6 Max", -1 },
|
{ "6 Max", -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
static const struct opt_items fullscreen[]= {
|
||||||
|
{ "Scaled", -1 },
|
||||||
|
{ "Scaled - Maintain Ratio", -1 },
|
||||||
|
#if (LCD_WIDTH>=160) && (LCD_HEIGHT>=144)
|
||||||
|
{ "Unscaled", -1 },
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
static const struct opt_items palette[]= {
|
static const struct opt_items palette[]= {
|
||||||
{ "Brown (Default)", -1 },
|
{ "Brown (Default)", -1 },
|
||||||
{ "Gray", -1 },
|
{ "Gray", -1 },
|
||||||
|
|
@ -369,17 +369,17 @@ static void do_opt_menu(void)
|
||||||
{ "Max Frameskip", NULL },
|
{ "Max Frameskip", NULL },
|
||||||
{ "Sound" , NULL },
|
{ "Sound" , NULL },
|
||||||
{ "Stats" , NULL },
|
{ "Stats" , NULL },
|
||||||
{ "Screen Size" , NULL },
|
|
||||||
{ "Screen Rotate" , NULL },
|
|
||||||
{ "Set Keys (Buggy)", NULL },
|
{ "Set Keys (Buggy)", NULL },
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
{ "Screen Size" , NULL },
|
||||||
|
{ "Screen Rotate" , NULL },
|
||||||
{ "Set Palette" , NULL },
|
{ "Set Palette" , NULL },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
m = menu_init(rb,items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL);
|
m = menu_init(rb,items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
options.dirty=1; /* Just assume that the settings have been changed */
|
options.dirty=1; /* Assume that the settings have been changed */
|
||||||
|
|
||||||
while(!done)
|
while(!done)
|
||||||
{
|
{
|
||||||
|
|
@ -400,19 +400,19 @@ static void do_opt_menu(void)
|
||||||
case 2: /* Stats */
|
case 2: /* Stats */
|
||||||
rb->set_option(items[2].desc, &options.showstats, INT, onoff, 2, NULL );
|
rb->set_option(items[2].desc, &options.showstats, INT, onoff, 2, NULL );
|
||||||
break;
|
break;
|
||||||
case 3: /* Screen Size */
|
case 3: /* Keys */
|
||||||
rb->set_option(items[3].desc, &options.fullscreen, INT, fullscreen,
|
setupkeys();
|
||||||
|
break;
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
case 4: /* Screen Size */
|
||||||
|
rb->set_option(items[4].desc, &options.fullscreen, INT, fullscreen,
|
||||||
sizeof(fullscreen)/sizeof(*fullscreen), NULL );
|
sizeof(fullscreen)/sizeof(*fullscreen), NULL );
|
||||||
setvidmode();
|
setvidmode();
|
||||||
break;
|
break;
|
||||||
case 4: /* Screen rotate */
|
case 5: /* Screen rotate */
|
||||||
rb->set_option(items[4].desc, &options.rotate, INT, onoff, 2, NULL );
|
rb->set_option(items[5].desc, &options.rotate, INT, onoff, 2, NULL );
|
||||||
setvidmode();
|
setvidmode();
|
||||||
break;
|
break;
|
||||||
case 5: /* Keys */
|
|
||||||
setupkeys();
|
|
||||||
break;
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
case 6: /* Palette */
|
case 6: /* Palette */
|
||||||
rb->set_option(items[6].desc, &options.pal, INT, palette, 17, NULL );
|
rb->set_option(items[6].desc, &options.pal, INT, palette, 17, NULL );
|
||||||
set_pal();
|
set_pal();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue