diff options
Diffstat (limited to 'apps/plugins/xworld/sys.c')
-rw-r--r-- | apps/plugins/xworld/sys.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index 4bcdfafebd..0af13efd11 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c | |||
@@ -290,7 +290,6 @@ void sys_menu(struct System* sys) | |||
290 | sys->loaded = engine_loadGameState(sys->e, 0); | 290 | sys->loaded = engine_loadGameState(sys->e, 0); |
291 | rb->lcd_update(); | 291 | rb->lcd_update(); |
292 | mainmenu_sysptr = sys; | 292 | mainmenu_sysptr = sys; |
293 | int sel = 0; | ||
294 | MENUITEM_STRINGLIST(menu, "XWorld Menu", mainmenu_cb, | 293 | MENUITEM_STRINGLIST(menu, "XWorld Menu", mainmenu_cb, |
295 | "Resume Game", /* 0 */ | 294 | "Resume Game", /* 0 */ |
296 | "Start New Game", /* 1 */ | 295 | "Start New Game", /* 1 */ |
@@ -307,8 +306,7 @@ void sys_menu(struct System* sys) | |||
307 | bool quit = false; | 306 | bool quit = false; |
308 | while(!quit) | 307 | while(!quit) |
309 | { | 308 | { |
310 | int item; | 309 | switch(rb->do_menu(&menu, NULL, NULL, false)) |
311 | switch(item = rb->do_menu(&menu, &sel, NULL, false)) | ||
312 | { | 310 | { |
313 | case 0: | 311 | case 0: |
314 | quit = true; | 312 | quit = true; |
@@ -569,10 +567,17 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16 | |||
569 | #ifdef HAVE_LCD_COLOR | 567 | #ifdef HAVE_LCD_COLOR |
570 | int r, g, b; | 568 | int r, g, b; |
571 | fb_data pix = rb->lcd_framebuffer[y * LCD_WIDTH + x]; | 569 | fb_data pix = rb->lcd_framebuffer[y * LCD_WIDTH + x]; |
570 | #if (LCD_DEPTH == 24) | ||
571 | r = pix.r; | ||
572 | g = pix.g; | ||
573 | b = pix.b; | ||
574 | rb->lcd_framebuffer[y * LCD_WIDTH + x] = (fb_data) { b, g, r }; | ||
575 | #else | ||
572 | r = RGB_UNPACK_RED (pix); | 576 | r = RGB_UNPACK_RED (pix); |
573 | g = RGB_UNPACK_GREEN(pix); | 577 | g = RGB_UNPACK_GREEN(pix); |
574 | b = RGB_UNPACK_BLUE (pix); | 578 | b = RGB_UNPACK_BLUE (pix); |
575 | rb->lcd_framebuffer[y * LCD_WIDTH + x] = LCD_RGBPACK(0xff - r, 0xff - g, 0xff - b); | 579 | rb->lcd_framebuffer[y * LCD_WIDTH + x] = LCD_RGBPACK(0xff - r, 0xff - g, 0xff - b); |
580 | #endif | ||
576 | #else | 581 | #else |
577 | rb->lcd_framebuffer[y * LCD_WIDTH + x] = LCD_BRIGHTNESS(0xff - rb->lcd_framebuffer[y * LCD_WIDTH + x]); | 582 | rb->lcd_framebuffer[y * LCD_WIDTH + x] = LCD_BRIGHTNESS(0xff - rb->lcd_framebuffer[y * LCD_WIDTH + x]); |
578 | #endif | 583 | #endif |