mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
SDL2: fix Ctrl-F/Ctrl-G as "key FIFO" keys, used in Mapster32.
By detecting them in the SDL_KEYDOWN events. This list is getting a bit ridiculous... git-svn-id: https://svn.eduke32.com/eduke32@4163 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
559c31159a
commit
5b53725c43
1 changed files with 10 additions and 6 deletions
|
@ -2050,13 +2050,15 @@ int32_t handleevents(void)
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
code = keytranslation[ev.key.keysym.scancode];
|
code = keytranslation[ev.key.keysym.scancode];
|
||||||
|
|
||||||
if (ev.key.type == SDL_KEYDOWN &&
|
if (ev.key.type == SDL_KEYDOWN && !keyascfifo_isfull() &&
|
||||||
(ev.key.keysym.scancode == SDL_SCANCODE_RETURN ||
|
(ev.key.keysym.scancode == SDL_SCANCODE_RETURN ||
|
||||||
ev.key.keysym.scancode == SDL_SCANCODE_KP_ENTER ||
|
ev.key.keysym.scancode == SDL_SCANCODE_KP_ENTER ||
|
||||||
ev.key.keysym.scancode == SDL_SCANCODE_ESCAPE ||
|
ev.key.keysym.scancode == SDL_SCANCODE_ESCAPE ||
|
||||||
ev.key.keysym.scancode == SDL_SCANCODE_BACKSPACE ||
|
ev.key.keysym.scancode == SDL_SCANCODE_BACKSPACE ||
|
||||||
ev.key.keysym.scancode == SDL_SCANCODE_TAB) &&
|
ev.key.keysym.scancode == SDL_SCANCODE_TAB ||
|
||||||
!keyascfifo_isfull())
|
(ev.key.keysym.mod==KMOD_LCTRL &&
|
||||||
|
(ev.key.keysym.scancode == SDL_SCANCODE_F ||
|
||||||
|
ev.key.keysym.scancode == SDL_SCANCODE_G))))
|
||||||
{
|
{
|
||||||
char keyvalue;
|
char keyvalue;
|
||||||
switch (ev.key.keysym.scancode)
|
switch (ev.key.keysym.scancode)
|
||||||
|
@ -2065,6 +2067,8 @@ int32_t handleevents(void)
|
||||||
case SDL_SCANCODE_ESCAPE: keyvalue = 27; break;
|
case SDL_SCANCODE_ESCAPE: keyvalue = 27; break;
|
||||||
case SDL_SCANCODE_BACKSPACE: keyvalue = '\b'; break;
|
case SDL_SCANCODE_BACKSPACE: keyvalue = '\b'; break;
|
||||||
case SDL_SCANCODE_TAB: keyvalue = '\t'; break;
|
case SDL_SCANCODE_TAB: keyvalue = '\t'; break;
|
||||||
|
case SDL_SCANCODE_F: keyvalue = 6; break;
|
||||||
|
case SDL_SCANCODE_G: keyvalue = 7; break;
|
||||||
default: keyvalue = 0; break;
|
default: keyvalue = 0; break;
|
||||||
}
|
}
|
||||||
if (OSD_HandleChar(keyvalue))
|
if (OSD_HandleChar(keyvalue))
|
||||||
|
|
Loading…
Reference in a new issue