Now you can exit the clock plugin again

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4927 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-07-23 21:02:56 +00:00
parent 0112fc8b0b
commit f215562afd

View file

@ -528,20 +528,6 @@ void reset_settings(void)
settings.fullscreen_invertseconds = false;
}
/**************
* Exits plugin
*************/
bool quit(bool save)
{
if(save)
save_settings();
/* restore set backlight timeout */
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
return PLUGIN_OK;
}
/********************************
* Saves "saved_settings" to disk
*******************************/
@ -2419,7 +2405,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* set backlight timeout */
rb->backlight_set_timeout(settings.backlight_on);
while (!PLUGIN_OK)
while (1)
{
/*********************
* Time info
@ -2645,8 +2631,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
switch (rb->button_get_w_tmo(HZ/10))
{
case BUTTON_OFF: /* save and exit */
quit(true);
break;
save_settings();
/* restore set backlight timeout */
rb->backlight_set_timeout(
rb->global_settings->backlight_timeout);
return PLUGIN_OK;
case BUTTON_ON | BUTTON_REL: /* credit roll */
show_credits();