diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-10-18 16:31:19 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 11:03:29 +0100 |
commit | 2f43d8b9bfa4745997090e482a3ab31675da317d (patch) | |
tree | 9e403e2c02668280aa2e6d43deb378c44eacd743 /src/cgame/cg_servercmds.c | |
parent | fffbf565dd4106e954c172662f0a4983ce99eeb3 (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/cgame/cg_servercmds.c')
0 files changed, 0 insertions, 0 deletions