From a28d74e71cacc947fcb7563f0f3ea8bba92bab0e Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 25 Jun 2007 04:26:23 +0000 Subject: 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 --- apps/plugins/rockboy/input.h | 4 ++-- apps/plugins/rockboy/lcd.c | 6 ++++++ apps/plugins/rockboy/menu.c | 40 ++++++++++++++++++++-------------------- 3 files changed, 28 insertions(+), 22 deletions(-) (limited to 'apps/plugins/rockboy') diff --git a/apps/plugins/rockboy/input.h b/apps/plugins/rockboy/input.h index 4ee1c9eb40..aa992380e9 100644 --- a/apps/plugins/rockboy/input.h +++ b/apps/plugins/rockboy/input.h @@ -14,7 +14,7 @@ typedef struct event_s #define EV_PRESS 1 #define EV_RELEASE 2 -int ev_postevent(event_t *ev) ICODE_ATTR; -int ev_getevent(event_t *ev) ICODE_ATTR; +int ev_postevent(event_t *ev); +int ev_getevent(event_t *ev); diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index bf44ccf136..494160dc85 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c @@ -876,6 +876,7 @@ void lcd_begin(void) set_pal(); +#ifdef HAVE_LCD_COLOR if(options.rotate) { if(options.fullscreen == 0) @@ -894,18 +895,22 @@ void lcd_begin(void) else vdest=fb.ptr+S1; } +#endif WY = R_WY; } +#ifdef HAVE_LCD_COLOR int SCALEWL IDATA_ATTR=1<<16; int SCALEWS IDATA_ATTR=1<<16; int SCALEHL IDATA_ATTR=1<<16; int SCALEHS IDATA_ATTR=1<<16; int swidth IDATA_ATTR=160; int sremain IDATA_ATTR=LCD_WIDTH-160; +#endif void setvidmode(void) { +#ifdef HAVE_LCD_COLOR switch(options.fullscreen) { case 0: @@ -972,6 +977,7 @@ void setvidmode(void) sremain=-(((160*SCALEWL)>>16)*LCD_WIDTH+1); else sremain=LCD_WIDTH-swidth; +#endif } void lcd_refreshline(void) diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index e358bafbb9..803310f70c 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c @@ -325,14 +325,6 @@ static void do_opt_menu(void) { "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[]= { { "0 Max", -1 }, { "1 Max", -1 }, @@ -343,7 +335,15 @@ static void do_opt_menu(void) { "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[]= { { "Brown (Default)", -1 }, { "Gray", -1 }, @@ -369,17 +369,17 @@ static void do_opt_menu(void) { "Max Frameskip", NULL }, { "Sound" , NULL }, { "Stats" , NULL }, - { "Screen Size" , NULL }, - { "Screen Rotate" , NULL }, { "Set Keys (Buggy)", NULL }, #ifdef HAVE_LCD_COLOR + { "Screen Size" , NULL }, + { "Screen Rotate" , NULL }, { "Set Palette" , NULL }, #endif }; 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) { @@ -400,19 +400,19 @@ static void do_opt_menu(void) case 2: /* Stats */ rb->set_option(items[2].desc, &options.showstats, INT, onoff, 2, NULL ); break; - case 3: /* Screen Size */ - rb->set_option(items[3].desc, &options.fullscreen, INT, fullscreen, + case 3: /* Keys */ + 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 ); setvidmode(); break; - case 4: /* Screen rotate */ - rb->set_option(items[4].desc, &options.rotate, INT, onoff, 2, NULL ); + case 5: /* Screen rotate */ + rb->set_option(items[5].desc, &options.rotate, INT, onoff, 2, NULL ); setvidmode(); break; - case 5: /* Keys */ - setupkeys(); - break; -#ifdef HAVE_LCD_COLOR case 6: /* Palette */ rb->set_option(items[6].desc, &options.pal, INT, palette, 17, NULL ); set_pal(); -- cgit v1.2.3