diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-23 21:02:56 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-23 21:02:56 +0000 |
| commit | f215562afda37249a3c629bc79f39f39cd7742e5 (patch) | |
| tree | 004e7657db36aab198df574c3996eb063f639798 /apps/plugins/clock.c | |
| parent | 0112fc8b0b44eec58f21a673acd51a916b5bae78 (diff) | |
| download | rockbox-f215562afda37249a3c629bc79f39f39cd7742e5.zip rockbox-f215562afda37249a3c629bc79f39f39cd7742e5.tar.gz rockbox-f215562afda37249a3c629bc79f39f39cd7742e5.tar.bz2 rockbox-f215562afda37249a3c629bc79f39f39cd7742e5.tar.xz | |
Now you can exit the clock plugin again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4927 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/clock.c')
| -rw-r--r-- | apps/plugins/clock.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c index 1c8c621..5e16415 100644 --- a/apps/plugins/clock.c +++ b/apps/plugins/clock.c @@ -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(); |