diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-18 14:23:18 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-08-18 14:23:18 +0000 |
| commit | 670abf99aeb9d78d5c3d7e6706789f5772d96364 (patch) | |
| tree | 76fdf03afc80a761463fcb5b0456938e90eed4ab /apps/misc.c | |
| parent | 9f30e1eefa1bd3861b309ef4c7f6faeb7e76e1ae (diff) | |
| download | rockbox-670abf99aeb9d78d5c3d7e6706789f5772d96364.zip rockbox-670abf99aeb9d78d5c3d7e6706789f5772d96364.tar.gz rockbox-670abf99aeb9d78d5c3d7e6706789f5772d96364.tar.bz2 rockbox-670abf99aeb9d78d5c3d7e6706789f5772d96364.tar.xz | |
The shutdown message is now displayed before saving the database, giving better user feedback when whutting off the player
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7351 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
| -rw-r--r-- | apps/misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/misc.c b/apps/misc.c index 9a89015..9f2ac36 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -340,7 +340,7 @@ bool settings_parseline(char* line, char** name, char** value) return true; } -bool clean_shutdown(void) +static bool clean_shutdown(void (*callback)(void *), void *parameter) { #ifdef SIMULATOR exit(0); @@ -351,6 +351,8 @@ bool clean_shutdown(void) { lcd_clear_display(); splash(0, true, str(LANG_SHUTTINGDOWN)); + if (callback != NULL) + callback(parameter); shutdown_hw(); } #endif @@ -425,9 +427,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame usb_screen(); return SYS_USB_CONNECTED; case SYS_POWEROFF: - if (callback != NULL) - callback(parameter); - if (!clean_shutdown()) + if (!clean_shutdown(callback, parameter)) return SYS_POWEROFF; break; #ifdef HAVE_CHARGING |