aboutsummaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sdl.c b/sdl.c
index 05a394c..431e527 100644
--- a/sdl.c
+++ b/sdl.c
@@ -510,6 +510,15 @@ static void sdl_refresh(DisplayState *ds)
!ev->active.gain && !gui_fullscreen_initial_grab) {
sdl_grab_end();
}
+ if (ev->active.state & SDL_APPACTIVE) {
+ if (ev->active.gain) {
+ /* Back to default interval */
+ ds->gui_timer_interval = 0;
+ } else {
+ /* Sleeping interval */
+ ds->gui_timer_interval = 500;
+ }
+ }
break;
default:
break;