summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2016-11-06 18:54:18 -0500
committerFranklin Wei <frankhwei536@gmail.com>2016-11-06 18:54:18 -0500
commitb4eda0ec627b5e51a1bc92cba6d10dbee2d16d93 (patch)
treec8946753bb58b4e957e12b50bb64cb22be2ee63f /apps/plugins
parentc180bf225a11d8e554b56130629b5d611fcab554 (diff)
downloadrockbox-b4eda0ec627b5e51a1bc92cba6d10dbee2d16d93.zip
rockbox-b4eda0ec627b5e51a1bc92cba6d10dbee2d16d93.tar.gz
rockbox-b4eda0ec627b5e51a1bc92cba6d10dbee2d16d93.tar.bz2
rockbox-b4eda0ec627b5e51a1bc92cba6d10dbee2d16d93.tar.xz
Revert "boost selectively"
This reverts commit 173d9fb38b029122e85610a69334ddb44107bd78.
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/xworld/sys.c46
1 files changed, 6 insertions, 40 deletions
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);
}