mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
* Rename backlight_force_on to backlight_ignore_timeout to make it clear what the function does.
* Add backlight_force_on() which forces to turn on backlight even when the setting is set to Off. use this in lamp. No functional change except lamp. See aslo FS#9883. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29128 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f06f685273
commit
01313d5039
37 changed files with 94 additions and 68 deletions
|
@ -2427,7 +2427,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* now go ahead and have fun! */
|
||||
rb->srand( *rb->current_tick );
|
||||
|
@ -2458,7 +2458,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
/* Restore user's original backlight setting */
|
||||
rb->lcd_setfont(FONT_UI);
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
|
|
@ -1050,7 +1050,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#endif
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
rb->srand( *rb->current_tick );
|
||||
|
||||
|
@ -1063,7 +1063,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
|
||||
rb->lcd_setfont(FONT_UI);
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -372,7 +372,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
(void)parameter;
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
rb->show_logo();
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
|
@ -384,7 +384,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
roll_credits();
|
||||
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
|
|
@ -436,9 +436,9 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
remote_backlight_force_on(); /* remote backlight control in lib/helper.c */
|
||||
remote_backlight_ignore_timeout();
|
||||
#endif
|
||||
ret = plugin_main();
|
||||
|
||||
|
|
|
@ -723,7 +723,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
systemvol= rb->global_settings->volume-rb->global_settings->volume%mod;
|
||||
general_translucency = default_translucency; // phares
|
||||
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
#ifdef RB_PROFILE
|
||||
rb->profile_thread();
|
||||
#endif
|
||||
|
|
|
@ -1352,7 +1352,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
mylcd_clear_display();
|
||||
mylcd_update();
|
||||
#endif
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(true);
|
||||
|
|
|
@ -278,7 +278,7 @@ void cleanup(void *parameter)
|
|||
grey_release();
|
||||
#endif
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
}
|
||||
|
||||
|
||||
|
@ -367,7 +367,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
|
||||
rb->lcd_set_mode(LCD_MODE_PAL256);
|
||||
|
|
|
@ -460,7 +460,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
|
||||
/* set everything up.. no BL timeout, no backdrop,
|
||||
white-text-on-black-background. */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_set_background(LCD_BLACK);
|
||||
|
@ -619,7 +619,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
}
|
||||
}
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(false);
|
||||
|
|
|
@ -131,7 +131,7 @@ void cleanup(void *parameter)
|
|||
|
||||
grey_release(); /* switch off overlay and deinitialize */
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
}
|
||||
|
||||
/* this is only a demo of what the framework can do */
|
||||
|
@ -216,7 +216,7 @@ int main(void)
|
|||
};
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
rb->lcd_setfont(FONT_SYSFIXED); /* select default font */
|
||||
|
||||
|
|
|
@ -965,7 +965,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->memcpy(&old_settings, &settings, sizeof (settings));
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
@ -993,7 +993,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#endif
|
||||
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
#ifdef USEGSLIB
|
||||
grey_release(); /* deinitialize */
|
||||
|
|
|
@ -1818,7 +1818,7 @@ enum plugin_status plugin_start(UNUSED const void* parameter)
|
|||
{
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* now go ahead and have fun! */
|
||||
game_loop();
|
||||
|
@ -1835,7 +1835,7 @@ enum plugin_status plugin_start(UNUSED const void* parameter)
|
|||
/* Restore user's original backlight setting */
|
||||
rb->lcd_setfont(FONT_UI);
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
|
|
@ -36,8 +36,17 @@ const unsigned bit_n_table[32] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
/* Force the backlight on */
|
||||
/* Force the backlight on */
|
||||
void backlight_force_on(void)
|
||||
{
|
||||
rb->backlight_set_timeout(0);
|
||||
#if CONFIG_CHARGING
|
||||
rb->backlight_set_timeout_plugged(0);
|
||||
#endif /* CONFIG_CHARGING */
|
||||
}
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
void backlight_ignore_timeout(void)
|
||||
{
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
rb->backlight_set_timeout(0);
|
||||
|
@ -60,6 +69,15 @@ void backlight_use_settings(void)
|
|||
#ifdef HAVE_REMOTE_LCD
|
||||
/* Force the backlight on */
|
||||
void remote_backlight_force_on(void)
|
||||
{
|
||||
rb->remote_backlight_set_timeout(0);
|
||||
#if CONFIG_CHARGING
|
||||
rb->remote_backlight_set_timeout_plugged(0);
|
||||
#endif /* CONFIG_CHARGING */
|
||||
}
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
void remote_backlight_ignore_timeout(void)
|
||||
{
|
||||
if (rb->global_settings->remote_backlight_timeout > 0)
|
||||
rb->remote_backlight_set_timeout(0);
|
||||
|
@ -84,6 +102,12 @@ void remote_backlight_use_settings(void)
|
|||
#ifdef HAVE_BUTTON_LIGHT
|
||||
/* Force the buttonlight on */
|
||||
void buttonlight_force_on(void)
|
||||
{
|
||||
rb->buttonlight_set_timeout(0);
|
||||
}
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
void buttonlight_ignore_timeout(void)
|
||||
{
|
||||
if (rb->global_settings->buttonlight_timeout > 0)
|
||||
rb->buttonlight_set_timeout(0);
|
||||
|
|
|
@ -27,14 +27,17 @@
|
|||
* Backlight on/off operations
|
||||
*/
|
||||
void backlight_force_on(void);
|
||||
void backlight_ignore_timeout(void);
|
||||
void backlight_use_settings(void);
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
void remote_backlight_force_on(void);
|
||||
void remote_backlight_ignore_timeout(void);
|
||||
void remote_backlight_use_settings(void);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void buttonlight_force_on(void);
|
||||
void buttonlight_ignore_timeout(void);
|
||||
void buttonlight_use_settings(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2320,7 +2320,7 @@ static bool lrc_theme_menu(void)
|
|||
#ifdef HAVE_LCD_COLOR
|
||||
"Inactive Colour",
|
||||
#endif
|
||||
"Backlight Force On");
|
||||
"Backlight Always On");
|
||||
|
||||
while (!exit && !usb)
|
||||
{
|
||||
|
@ -2344,7 +2344,7 @@ static bool lrc_theme_menu(void)
|
|||
break;
|
||||
#endif
|
||||
case LRC_MENU_BACKLIGHT:
|
||||
usb = rb->set_bool("Backlight Force On", &prefs.backlight_on);
|
||||
usb = rb->set_bool("Backlight Always On", &prefs.backlight_on);
|
||||
break;
|
||||
case MENU_ATTACHED_USB:
|
||||
usb = true;
|
||||
|
@ -2797,7 +2797,7 @@ static int lrc_main(void)
|
|||
}
|
||||
|
||||
if (prefs.backlight_on)
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
/* in case settings that may affect break position
|
||||
|
|
|
@ -497,7 +497,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
(void)parameter;
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* Seed the RNG */
|
||||
rb->srand(*rb->current_tick);
|
||||
|
@ -585,6 +585,6 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
lastbutton = button;
|
||||
}
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
return ((quit == 1) ? PLUGIN_OK : PLUGIN_USB_CONNECTED);
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ static void store_lcd_settings(void)
|
|||
******************************************************************************/
|
||||
static void restore_lcd_settings(void) {
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
/* Restore the old settings */
|
||||
#if LCD_DEPTH > 1
|
||||
|
@ -271,7 +271,7 @@ static void restore_lcd_settings(void) {
|
|||
******************************************************************************/
|
||||
static void plugin_lcd_settings(void) {
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* Set the new settings */
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
|
|
|
@ -822,8 +822,7 @@ static void osd_backlight_on_video_mode(bool video_on)
|
|||
{
|
||||
if (video_on) {
|
||||
/* Turn off backlight timeout */
|
||||
/* backlight control in lib/helper.c */
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||
rb->remove_event(LCD_EVENT_ACTIVATION, osd_lcd_enable_hook);
|
||||
#endif
|
||||
|
|
|
@ -780,7 +780,7 @@ void cleanup(void)
|
|||
rb->lcd_set_background(LCD_DEFAULT_BG);
|
||||
#endif
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
}
|
||||
|
||||
enum plugin_status plugin_start(const void* parameter)
|
||||
|
@ -808,7 +808,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#endif
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
rb->lcd_getstringsize("A", NULL, &font_height);
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
return PLUGIN_ERROR;
|
||||
|
||||
/* Make backlight remain on -- making music requires attention. */
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* Main loop. */
|
||||
while(!quit)
|
||||
|
|
|
@ -2203,7 +2203,7 @@ void cleanup(void)
|
|||
#endif
|
||||
end_pf_thread();
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
#ifdef USEGSLIB
|
||||
grey_release();
|
||||
|
@ -2666,7 +2666,7 @@ int main(void)
|
|||
draw_splashscreen();
|
||||
if(backlight_mode == 0) {
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
}
|
||||
|
||||
init_scroll_lines();
|
||||
|
|
|
@ -547,7 +547,7 @@ static bool main_menu(void)
|
|||
}
|
||||
}
|
||||
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
return exit_tuner;
|
||||
}
|
||||
|
||||
|
@ -995,7 +995,7 @@ static void record_and_get_pitch(void)
|
|||
audio_tail = 1;
|
||||
#endif
|
||||
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
|
||||
record_data();
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ void cleanup(void)
|
|||
grey_release();
|
||||
#endif
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
|
||||
rb->lcd_set_mode(LCD_MODE_RGB565);
|
||||
#endif
|
||||
|
@ -317,7 +317,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
|
||||
rb->lcd_set_mode(LCD_MODE_PAL256);
|
||||
|
|
|
@ -659,7 +659,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
(void)parameter;
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
/* Clear screen */
|
||||
rb->lcd_clear_display();
|
||||
|
||||
|
|
|
@ -574,7 +574,7 @@ static void display_helpfile(void)
|
|||
|
||||
static void led_resistance_calc(void)
|
||||
{
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
int voltage_menu_selection, button_press, j, k, l, foreward_current = 0;
|
||||
int fwd_current_selection = 0;
|
||||
bool quit = false;
|
||||
|
@ -779,7 +779,7 @@ static void led_resistance_calc(void)
|
|||
|
||||
static void resistance_to_color(void)
|
||||
{
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
int menu_selection;
|
||||
int menu_selection_tol;
|
||||
int button_press;
|
||||
|
@ -916,7 +916,7 @@ static void resistance_to_color(void)
|
|||
|
||||
static void color_to_resistance(void)
|
||||
{
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
bool quit = false;
|
||||
int button_input = 0;
|
||||
|
||||
|
|
|
@ -1345,13 +1345,13 @@ static int rockblox_loop (void)
|
|||
#ifdef HAS_BUTTON_HOLD
|
||||
if (rb->button_hold ()) {
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
rb->splash(0, "Paused");
|
||||
while (rb->button_hold ())
|
||||
rb->sleep(HZ/10);
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* get rid of the splash text */
|
||||
rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
|
@ -1527,7 +1527,7 @@ enum plugin_status plugin_start (const void *parameter)
|
|||
}
|
||||
#endif
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
load_game();
|
||||
resume_file = resume;
|
||||
while(!rockblox_loop()) {
|
||||
|
@ -1548,7 +1548,7 @@ enum plugin_status plugin_start (const void *parameter)
|
|||
#endif
|
||||
/* Save user's HighScore */
|
||||
highscore_save(SCORE_FILE, highscores, NUM_SCORES);
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ int do_user_menu(void) {
|
|||
#endif
|
||||
|
||||
/* ignore backlight time out */
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#endif
|
||||
|
||||
/* ignore backlight time out */
|
||||
backlight_force_on();
|
||||
backlight_ignore_timeout();
|
||||
|
||||
gnuboy_main(parameter);
|
||||
|
||||
|
|
|
@ -473,7 +473,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
char *ptemp;
|
||||
(void)(parameter);
|
||||
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
|
@ -577,6 +577,6 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->yield();
|
||||
}
|
||||
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK;
|
||||
}
|
||||
|
|
|
@ -2009,7 +2009,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
/* universal font */
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
highscore_load(SCORE_FILE, highscores, NUM_SCORES);
|
||||
rb->srand(*rb->current_tick);
|
||||
|
||||
|
@ -2022,7 +2022,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->lcd_setfont(FONT_UI);
|
||||
highscore_save(SCORE_FILE, highscores, NUM_SCORES);
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -523,12 +523,12 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
|
||||
(void)parameter;
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
ret = plugin_main();
|
||||
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c*/
|
||||
backlight_use_settings();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -441,7 +441,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->srand(*rb->current_tick);
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
while(!quit)
|
||||
{
|
||||
|
@ -460,7 +460,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
}
|
||||
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
rb->rmdir(testbasedir);
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||
cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
|
||||
#endif
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
time_main_update();
|
||||
rb->sleep(HZ);
|
||||
|
@ -389,7 +389,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
(cpu_freq + 500000) / 1000000);
|
||||
log_text(str);
|
||||
#endif
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
/* wait until user closes plugin */
|
||||
while (rb->button_get(true) != FPS_QUIT);
|
||||
|
|
|
@ -441,7 +441,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_clear_display();
|
||||
#endif
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
rb->splashf(0, "LCD driver performance test, please wait %d sec",
|
||||
6*4*DURATION/HZ);
|
||||
|
|
|
@ -184,7 +184,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
for (i = 0; i <= STEPS; i++)
|
||||
input_levels[i] = lcd_levels[i] = (255 * i + (STEPS/2)) / STEPS;
|
||||
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
grey_set_background(0); /* set background to black */
|
||||
grey_clear_display();
|
||||
|
@ -279,6 +279,6 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
}
|
||||
|
||||
grey_release();
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
|
|
@ -585,7 +585,7 @@ void Cleanup(void *fd)
|
|||
rb->mp3_play_stop(); /* stop audio ISR */
|
||||
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
|
||||
/* restore normal contrast */
|
||||
rb->lcd_set_contrast(rb->global_settings->contrast);
|
||||
|
@ -954,7 +954,7 @@ int main(char* filename)
|
|||
{
|
||||
gPlay.bHasVideo = true;
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
}
|
||||
|
||||
/* prepare audio playback, if contained */
|
||||
|
|
|
@ -2313,7 +2313,7 @@ static bool launch_wormlet(void)
|
|||
rb->lcd_clear_display();
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* start the game */
|
||||
while (game_result == 1)
|
||||
|
@ -2323,7 +2323,7 @@ static bool launch_wormlet(void)
|
|||
{
|
||||
case 2:
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1110,13 +1110,13 @@ enum plugin_status plugin_start (const void *parameter)
|
|||
#endif
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
backlight_force_on(); /* backlight control in lib/helper.c */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
randomize ();
|
||||
ret = xobox_loop ();
|
||||
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings(); /* backlight control in lib/helper.c */
|
||||
backlight_use_settings();
|
||||
rb->lcd_setfont (FONT_UI);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue