summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2011-02-15 19:43:04 +0000
committerThomas Jarosch <tomj@simonv.com>2011-02-15 19:43:04 +0000
commit258626f4550be2e586c9e5acf20cb71ee001a8e4 (patch)
tree24659c17ed31eac362056253392c960898540899 /uisimulator
parent1f85259ef15e51fa912324b635e2474aff4c0a0f (diff)
downloadrockbox-258626f4550be2e586c9e5acf20cb71ee001a8e4.tar.gz
rockbox-258626f4550be2e586c9e5acf20cb71ee001a8e4.tar.bz2
rockbox-258626f4550be2e586c9e5acf20cb71ee001a8e4.zip
Fix the shutdown sequence for maemo, SDL and simulator builds
Do proper shutdown in RaaA builds like writeout of last.FM scrobbler file and other neat things. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29309 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/powermgmt-sim.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/uisimulator/common/powermgmt-sim.c b/uisimulator/common/powermgmt-sim.c
index dbd3149fbb..30b04d6a0b 100644
--- a/uisimulator/common/powermgmt-sim.c
+++ b/uisimulator/common/powermgmt-sim.c
@@ -24,6 +24,7 @@
#include <time.h>
#include "kernel.h"
#include "powermgmt.h"
+#include <SDL_events.h>
#define BATT_MINMVOLT 2500 /* minimum millivolts of battery */
#define BATT_MAXMVOLT 4500 /* maximum millivolts of battery */
@@ -155,6 +156,11 @@ void reset_poweroff_timer(void)
void shutdown_hw(void)
{
+ /* Shut down SDL event loop */
+ SDL_Event event;
+ memset(&event, 0, sizeof(SDL_Event));
+ event.type = SDL_USEREVENT;
+ SDL_PushEvent(&event);
}
void cancel_shutdown(void)