forked from len0rd/rockbox
Fixed cpu boost/unboost (in case of a plugin error, the cpu was unboosted without being boosted earlier). Also fixed possible missing cleanup in case write_pfconfig fails.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17167 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6592f942c1
commit
a1b3c69a0f
1 changed files with 7 additions and 7 deletions
|
@ -1493,9 +1493,6 @@ void update_scroll_animation(void)
|
||||||
void cleanup(void *parameter)
|
void cleanup(void *parameter)
|
||||||
{
|
{
|
||||||
(void) parameter;
|
(void) parameter;
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
|
||||||
rb->cpu_boost(false);
|
|
||||||
#endif
|
|
||||||
/* Turn on backlight timeout (revert to settings) */
|
/* Turn on backlight timeout (revert to settings) */
|
||||||
backlight_use_settings(rb); /* backlight control in lib/helper.c */
|
backlight_use_settings(rb); /* backlight control in lib/helper.c */
|
||||||
|
|
||||||
|
@ -1947,9 +1944,6 @@ int main(void)
|
||||||
char fpstxt[10];
|
char fpstxt[10];
|
||||||
int button;
|
int button;
|
||||||
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
|
||||||
rb->cpu_boost(true);
|
|
||||||
#endif
|
|
||||||
int frames = 0;
|
int frames = 0;
|
||||||
long last_update = *rb->current_tick;
|
long last_update = *rb->current_tick;
|
||||||
long current_update;
|
long current_update;
|
||||||
|
@ -2097,11 +2091,17 @@ enum plugin_status plugin_start(struct plugin_api *api, void *parameter)
|
||||||
#endif
|
#endif
|
||||||
/* Turn off backlight timeout */
|
/* Turn off backlight timeout */
|
||||||
backlight_force_on(rb); /* backlight control in lib/helper.c */
|
backlight_force_on(rb); /* backlight control in lib/helper.c */
|
||||||
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
rb->cpu_boost(true);
|
||||||
|
#endif
|
||||||
ret = main();
|
ret = main();
|
||||||
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
rb->cpu_boost(false);
|
||||||
|
#endif
|
||||||
if ( ret == PLUGIN_OK ) {
|
if ( ret == PLUGIN_OK ) {
|
||||||
if (!write_pfconfig()) {
|
if (!write_pfconfig()) {
|
||||||
rb->splash(HZ, "Error writing config.");
|
rb->splash(HZ, "Error writing config.");
|
||||||
return PLUGIN_ERROR;
|
ret = PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue