diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-06-25 04:26:23 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-06-25 04:26:23 +0000 |
commit | a28d74e71cacc947fcb7563f0f3ea8bba92bab0e (patch) | |
tree | ca7aee6baa1530ae19ff034a536045eb11348386 /apps/plugins/rockboy | |
parent | 3490acbfbd835c3125cb590fa86d39d3df6895f9 (diff) | |
download | rockbox-a28d74e71cacc947fcb7563f0f3ea8bba92bab0e.tar.gz rockbox-a28d74e71cacc947fcb7563f0f3ea8bba92bab0e.zip |
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
Diffstat (limited to 'apps/plugins/rockboy')
-rw-r--r-- | apps/plugins/rockboy/input.h | 4 | ||||
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 6 | ||||
-rw-r--r-- | apps/plugins/rockboy/menu.c | 40 |
3 files changed, 28 insertions, 22 deletions
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 | |||
14 | #define EV_PRESS 1 | 14 | #define EV_PRESS 1 |
15 | #define EV_RELEASE 2 | 15 | #define EV_RELEASE 2 |
16 | 16 | ||
17 | int ev_postevent(event_t *ev) ICODE_ATTR; | 17 | int ev_postevent(event_t *ev); |
18 | int ev_getevent(event_t *ev) ICODE_ATTR; | 18 | int ev_getevent(event_t *ev); |
19 | 19 | ||
20 | 20 | ||
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) | |||
876 | 876 | ||
877 | set_pal(); | 877 | set_pal(); |
878 | 878 | ||
879 | #ifdef HAVE_LCD_COLOR | ||
879 | if(options.rotate) | 880 | if(options.rotate) |
880 | { | 881 | { |
881 | if(options.fullscreen == 0) | 882 | if(options.fullscreen == 0) |
@@ -894,18 +895,22 @@ void lcd_begin(void) | |||
894 | else | 895 | else |
895 | vdest=fb.ptr+S1; | 896 | vdest=fb.ptr+S1; |
896 | } | 897 | } |
898 | #endif | ||
897 | WY = R_WY; | 899 | WY = R_WY; |
898 | } | 900 | } |
899 | 901 | ||
902 | #ifdef HAVE_LCD_COLOR | ||
900 | int SCALEWL IDATA_ATTR=1<<16; | 903 | int SCALEWL IDATA_ATTR=1<<16; |
901 | int SCALEWS IDATA_ATTR=1<<16; | 904 | int SCALEWS IDATA_ATTR=1<<16; |
902 | int SCALEHL IDATA_ATTR=1<<16; | 905 | int SCALEHL IDATA_ATTR=1<<16; |
903 | int SCALEHS IDATA_ATTR=1<<16; | 906 | int SCALEHS IDATA_ATTR=1<<16; |
904 | int swidth IDATA_ATTR=160; | 907 | int swidth IDATA_ATTR=160; |
905 | int sremain IDATA_ATTR=LCD_WIDTH-160; | 908 | int sremain IDATA_ATTR=LCD_WIDTH-160; |
909 | #endif | ||
906 | 910 | ||
907 | void setvidmode(void) | 911 | void setvidmode(void) |
908 | { | 912 | { |
913 | #ifdef HAVE_LCD_COLOR | ||
909 | switch(options.fullscreen) | 914 | switch(options.fullscreen) |
910 | { | 915 | { |
911 | case 0: | 916 | case 0: |
@@ -972,6 +977,7 @@ void setvidmode(void) | |||
972 | sremain=-(((160*SCALEWL)>>16)*LCD_WIDTH+1); | 977 | sremain=-(((160*SCALEWL)>>16)*LCD_WIDTH+1); |
973 | else | 978 | else |
974 | sremain=LCD_WIDTH-swidth; | 979 | sremain=LCD_WIDTH-swidth; |
980 | #endif | ||
975 | } | 981 | } |
976 | 982 | ||
977 | void lcd_refreshline(void) | 983 | 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) | |||
325 | { "On" , -1 }, | 325 | { "On" , -1 }, |
326 | }; | 326 | }; |
327 | 327 | ||
328 | static const struct opt_items fullscreen[]= { | ||
329 | { "Scaled", -1 }, | ||
330 | { "Scaled - Maintain Ratio", -1 }, | ||
331 | #if (LCD_WIDTH>=160) && (LCD_HEIGHT>=144) | ||
332 | { "Unscaled", -1 }, | ||
333 | #endif | ||
334 | }; | ||
335 | |||
336 | static const struct opt_items frameskip[]= { | 328 | static const struct opt_items frameskip[]= { |
337 | { "0 Max", -1 }, | 329 | { "0 Max", -1 }, |
338 | { "1 Max", -1 }, | 330 | { "1 Max", -1 }, |
@@ -343,7 +335,15 @@ static void do_opt_menu(void) | |||
343 | { "6 Max", -1 }, | 335 | { "6 Max", -1 }, |
344 | }; | 336 | }; |
345 | 337 | ||
346 | #ifdef HAVE_LCD_COLOR | 338 | #ifdef HAVE_LCD_COLOR |
339 | static const struct opt_items fullscreen[]= { | ||
340 | { "Scaled", -1 }, | ||
341 | { "Scaled - Maintain Ratio", -1 }, | ||
342 | #if (LCD_WIDTH>=160) && (LCD_HEIGHT>=144) | ||
343 | { "Unscaled", -1 }, | ||
344 | #endif | ||
345 | }; | ||
346 | |||
347 | static const struct opt_items palette[]= { | 347 | static const struct opt_items palette[]= { |
348 | { "Brown (Default)", -1 }, | 348 | { "Brown (Default)", -1 }, |
349 | { "Gray", -1 }, | 349 | { "Gray", -1 }, |
@@ -369,17 +369,17 @@ static void do_opt_menu(void) | |||
369 | { "Max Frameskip", NULL }, | 369 | { "Max Frameskip", NULL }, |
370 | { "Sound" , NULL }, | 370 | { "Sound" , NULL }, |
371 | { "Stats" , NULL }, | 371 | { "Stats" , NULL }, |
372 | { "Screen Size" , NULL }, | ||
373 | { "Screen Rotate" , NULL }, | ||
374 | { "Set Keys (Buggy)", NULL }, | 372 | { "Set Keys (Buggy)", NULL }, |
375 | #ifdef HAVE_LCD_COLOR | 373 | #ifdef HAVE_LCD_COLOR |
374 | { "Screen Size" , NULL }, | ||
375 | { "Screen Rotate" , NULL }, | ||
376 | { "Set Palette" , NULL }, | 376 | { "Set Palette" , NULL }, |
377 | #endif | 377 | #endif |
378 | }; | 378 | }; |
379 | 379 | ||
380 | m = menu_init(rb,items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL); | 380 | m = menu_init(rb,items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL); |
381 | 381 | ||
382 | options.dirty=1; /* Just assume that the settings have been changed */ | 382 | options.dirty=1; /* Assume that the settings have been changed */ |
383 | 383 | ||
384 | while(!done) | 384 | while(!done) |
385 | { | 385 | { |
@@ -400,19 +400,19 @@ static void do_opt_menu(void) | |||
400 | case 2: /* Stats */ | 400 | case 2: /* Stats */ |
401 | rb->set_option(items[2].desc, &options.showstats, INT, onoff, 2, NULL ); | 401 | rb->set_option(items[2].desc, &options.showstats, INT, onoff, 2, NULL ); |
402 | break; | 402 | break; |
403 | case 3: /* Screen Size */ | 403 | case 3: /* Keys */ |
404 | rb->set_option(items[3].desc, &options.fullscreen, INT, fullscreen, | 404 | setupkeys(); |
405 | break; | ||
406 | #ifdef HAVE_LCD_COLOR | ||
407 | case 4: /* Screen Size */ | ||
408 | rb->set_option(items[4].desc, &options.fullscreen, INT, fullscreen, | ||
405 | sizeof(fullscreen)/sizeof(*fullscreen), NULL ); | 409 | sizeof(fullscreen)/sizeof(*fullscreen), NULL ); |
406 | setvidmode(); | 410 | setvidmode(); |
407 | break; | 411 | break; |
408 | case 4: /* Screen rotate */ | 412 | case 5: /* Screen rotate */ |
409 | rb->set_option(items[4].desc, &options.rotate, INT, onoff, 2, NULL ); | 413 | rb->set_option(items[5].desc, &options.rotate, INT, onoff, 2, NULL ); |
410 | setvidmode(); | 414 | setvidmode(); |
411 | break; | 415 | break; |
412 | case 5: /* Keys */ | ||
413 | setupkeys(); | ||
414 | break; | ||
415 | #ifdef HAVE_LCD_COLOR | ||
416 | case 6: /* Palette */ | 416 | case 6: /* Palette */ |
417 | rb->set_option(items[6].desc, &options.pal, INT, palette, 17, NULL ); | 417 | rb->set_option(items[6].desc, &options.pal, INT, palette, 17, NULL ); |
418 | set_pal(); | 418 | set_pal(); |