doom3-bfg/neo/sys/sdl
Daniel Gibson e37671d6ac Change SDL event-handling, mostly for keyboard input
Sys_GetEvent()
* renamed res_none to no_more_events, because that's what the
  caller assumes when getting that event
* don't return res_none on unhandled events, instead get the next event
  until there is a handled event or no more events
  (=> if -> while, return res_none -> continue)
* Mapping to Doom3 keynum handled differently for SDL1 vs SDL2, see below

For SDL2 we don't use SDL_KeyToDoom3Key on the keysym anymore, but map
the SDL2 scancode to Doom3/Direct-Input scancodes instead (the keynum_t
K_* constants are really used as scancodes!).

This mapping is done in sdl2_scancode_mappings.h scancodeToKeyNum[].
In sdl_events.cpp there are static SDLScanCodeToKeyNum() and
KeyNumToSDLScanCode() functions that use this scancodeToKeyNum[] array.

Sys_GetKeyName() now does something sensible for SDL2 by using
KeyNumToSDLScanCode()

This is also used to implement idKeyInput::LocalizedKeyName() for SDL-targets
(for SDL1.2 the behavior doesn't change much, though, as it doesn't have
consistent scancodes - Sys_GetKeyName() will just return NULL and
idKeyInput::LocalizedKeyName() will fall back to the old default)
2015-01-06 21:22:12 +01:00
..
sdl2_scancode_mappings.h Change SDL event-handling, mostly for keyboard input 2015-01-06 21:22:12 +01:00
sdl_cpu.cpp Make it compile with SDL2 again 2013-03-24 23:44:13 +01:00
sdl_events.cpp Change SDL event-handling, mostly for keyboard input 2015-01-06 21:22:12 +01:00
sdl_glimp.cpp Disabled usage of OpenGL 3.2 compatibility profiles for Linux #187 2014-11-12 12:34:07 +01:00
sdl_local.h Added missing neo/sys/sdl/sdl_local.h 2012-12-11 23:23:17 +01:00