]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
Manage resetting the key event state on video reinitialization centrally.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Apr 2018 20:42:29 +0000 (20:42 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Apr 2018 20:42:29 +0000 (20:42 +0000)
commit23fba558a074bc8f7b32f9dceae4a2eb96f1789a
treefa3cb0e74f0ba323263ac1323b3ed248839ef659
parenta8b156d66e65793406f0039985f62307d153126e
Manage resetting the key event state on video reinitialization centrally.

Fixes:
- No key state clear when SDL gets restarted.
- Key state clear was the wrong action - it allows all keys to get pressed
  again, but does not actually release anything in cl_input.c, so e.g. +jump
  binds stay pressed on vid_restart.

Only vid_wgl.c retains some vid-specific handling (reset of key state when
alt-tabbing out and back in) - there's a chance that we may need similar logic
in the other vid drivers; if so, it may be possible to do this in a shared
place too by watching for changes to vid_activewindow.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12362 d7cf8633-e32d-0410-b094-e92efae38249
keys.c
keys.h
vid_agl.c
vid_glx.c
vid_shared.c
vid_wgl.c