diff options
Diffstat (limited to 'uisimulator/common/powermgmt-sim.c')
-rw-r--r-- | uisimulator/common/powermgmt-sim.c | 6 |
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 @@ | |||
24 | #include <time.h> | 24 | #include <time.h> |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "powermgmt.h" | 26 | #include "powermgmt.h" |
27 | #include <SDL_events.h> | ||
27 | 28 | ||
28 | #define BATT_MINMVOLT 2500 /* minimum millivolts of battery */ | 29 | #define BATT_MINMVOLT 2500 /* minimum millivolts of battery */ |
29 | #define BATT_MAXMVOLT 4500 /* maximum millivolts of battery */ | 30 | #define BATT_MAXMVOLT 4500 /* maximum millivolts of battery */ |
@@ -155,6 +156,11 @@ void reset_poweroff_timer(void) | |||
155 | 156 | ||
156 | void shutdown_hw(void) | 157 | void shutdown_hw(void) |
157 | { | 158 | { |
159 | /* Shut down SDL event loop */ | ||
160 | SDL_Event event; | ||
161 | memset(&event, 0, sizeof(SDL_Event)); | ||
162 | event.type = SDL_USEREVENT; | ||
163 | SDL_PushEvent(&event); | ||
158 | } | 164 | } |
159 | 165 | ||
160 | void cancel_shutdown(void) | 166 | void cancel_shutdown(void) |