rest of FS#11632 by Michael Stummvoll with modification by me.

- don't turn off backlight while playing.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28557 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-11-11 12:08:00 +00:00
parent 4d8430ffe3
commit 5727688e72
2 changed files with 21 additions and 9 deletions

View file

@ -4,6 +4,7 @@
/* Note: this file only exposes one function: do_user_menu(). */
/*********************************************************************/
#include "lib/helper.h"
#include "button.h"
#include "rockmacros.h"
#include "mem.h"
@ -46,18 +47,18 @@ static int getbutton(char *text)
static void setupkeys(void)
{
options.UP=getbutton ("Press Up");
options.DOWN=getbutton ("Press Down");
options.LEFT=getbutton ("Press Left");
options.RIGHT=getbutton ("Press Right");
options.UP = getbutton("Press Up");
options.DOWN = getbutton("Press Down");
options.LEFT = getbutton("Press Left");
options.RIGHT = getbutton("Press Right");
options.A=getbutton ("Press A");
options.B=getbutton ("Press B");
options.A = getbutton("Press A");
options.B = getbutton("Press B");
options.START=getbutton ("Press Start");
options.SELECT=getbutton("Press Select");
options.START = getbutton("Press Start");
options.SELECT = getbutton("Press Select");
options.MENU=getbutton ("Press Menu");
options.MENU = getbutton("Press Menu");
}
/*
@ -80,6 +81,8 @@ int do_user_menu(void) {
rb->lcd_set_mode(LCD_MODE_RGB565);
#endif
backlight_use_settings();
/* Clean out the button Queue */
while (rb->button_get(false) != BUTTON_NONE)
rb->yield();
@ -128,6 +131,9 @@ int do_user_menu(void) {
rb->lcd_set_mode(LCD_MODE_PAL256);
#endif
/* ignore backlight time out */
backlight_force_on();
return ret;
}

View file

@ -19,6 +19,7 @@
*
****************************************************************************/
#include "plugin.h"
#include "lib/helper.h"
#include "loader.h"
#include "rockmacros.h"
#include "input.h"
@ -426,6 +427,9 @@ enum plugin_status plugin_start(const void* parameter)
rb->lcd_set_mode(LCD_MODE_PAL256);
#endif
/* ignore backlight time out */
backlight_force_on();
gnuboy_main(parameter);
#ifdef HAVE_WHEEL_POSITION
@ -436,6 +440,8 @@ enum plugin_status plugin_start(const void* parameter)
rb->lcd_set_mode(LCD_MODE_RGB565);
#endif
backlight_use_settings();
if(shut&&!cleanshut)
{
rb->splash(HZ/2, errormsg);