Revert "Removed the game's automatic pausing when window focus is lost."

This reverts commit d4ff9213b5.
This commit is contained in:
onpon4 2015-05-21 18:30:23 -04:00
parent 46a80eb30b
commit e4664b9b1a
1 changed files with 5 additions and 0 deletions

View File

@ -250,6 +250,11 @@ void getPlayerInput()
engine.keyState[KEY_RIGHT] = prevjoyright = joyright; engine.keyState[KEY_RIGHT] = prevjoyright = joyright;
} }
break; break;
case SDL_WINDOWEVENT:
if(engine.event.window.event == SDL_WINDOWEVENT_FOCUS_LOST)
engine.paused = 1;
break;
} }
if (engine.keyState[KEY_FULLSCREEN]) if (engine.keyState[KEY_FULLSCREEN])