summaryrefslogtreecommitdiff
path: root/src/SDL2/include/SDL_system.h
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-10-18 16:31:19 -0500
committerTim Angus <tim@ngus.net>2014-08-28 11:03:29 +0100
commit2f43d8b9bfa4745997090e482a3ab31675da317d (patch)
tree9e403e2c02668280aa2e6d43deb378c44eacd743 /src/SDL2/include/SDL_system.h
parentfffbf565dd4106e954c172662f0a4983ce99eeb3 (diff)
Fix SDL2 losing event subsystem
Quiting SDL Video or Joystick subsystem implies quiting the Event subsystem in SDL2. SDL keeps track of number of init and shutdown calls for each subsystem. Shuting down video or joystick more or equal to number of times they're inited will lead to event shutdown. Toggling in and out of fullscreen or running in_restart twice causes SDL event subsystem to shutdown, making input not work. If the console is closed, IN_GobbleMotionEvents gets stuck in a loop. SDL_PeepEvents returns -1 when there is an error, but we assume non-0 means read more events. IN_ShutdownJoystick needs to check if joystick subsystem was inited before quitting it, otherwise we may cause SDL event subsystem to shutdown.
Diffstat (limited to 'src/SDL2/include/SDL_system.h')
0 files changed, 0 insertions, 0 deletions