From b4eda0ec627b5e51a1bc92cba6d10dbee2d16d93 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 6 Nov 2016 18:54:18 -0500 Subject: Revert "boost selectively" This reverts commit 173d9fb38b029122e85610a69334ddb44107bd78. --- apps/plugins/xworld/sys.c | 46 ++++++---------------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index 53f6b78..ea3dacd 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c @@ -231,6 +231,7 @@ static void do_video_settings(struct System* sys) } break; case 5: + rb->lcd_clear_display(); sys_save_settings(sys); return; } @@ -295,38 +296,6 @@ static int mainmenu_cb(int action, const struct menu_item_ex *this_item) return action; } -static bool is_boosted = false; - -void sys_boost(struct System *sys) -{ - (void) sys; -#ifdef HAVE_ADJUSTABLE_CPU_FREQ - if(!is_boosted) - { - rb->cpu_boost(true); - is_boosted = true; - } -#endif -} - -void sys_unboost(struct System *sys) -{ - (void) sys; -#ifdef HAVE_ADJUSTABLE_CPU_FREQ - if(is_boosted) - { - rb->cpu_boost(false); - is_boosted = false; - } -#endif -} - -static void boost_if_needed(struct System *sys) -{ - if(sys->e->vm._fastMode || sys->settings.scaling_quality == 2) - sys_boost(sys); -} - static AudioCallback audio_callback = NULL; static void get_more(const void** start, size_t* size); static void* audio_param; @@ -408,16 +377,16 @@ void sys_menu(struct System* sys) break; } } - - /* boost CPU if necessary */ - boost_if_needed(sys); - + rb->lcd_clear_display(); sys_startAudio(sys, audio_callback, audio_param); } void sys_init(struct System* sys, const char* title) { (void) title; +#ifdef HAVE_ADJUSTABLE_CPU_FREQ + rb->cpu_boost(true); +#endif backlight_ignore_timeout(); rb_atexit(exit_handler); save_sys = sys; @@ -652,7 +621,6 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16 static void do_pause_menu(struct System* sys) { sys_stopAudio(sys); - sys_unboost(sys); int sel = 0; MENUITEM_STRINGLIST(menu, "XWorld Menu", NULL, "Resume Game", /* 0 */ @@ -717,9 +685,7 @@ static void do_pause_menu(struct System* sys) break; } } - - boost_if_needed(sys); - + rb->lcd_clear_display(); sys_startAudio(sys, audio_callback, audio_param); } -- cgit v1.1