1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Thomas Jarosch 2011-02-15 19:43:04 +00:00
parent 1f85259ef1
commit 258626f455
4 changed files with 18 additions and 1 deletions

View file

@ -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)