mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix the RETURN and KP_ENTER keys under SDL2.
git-svn-id: https://svn.eduke32.com/eduke32@4083 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
22490587f0
commit
d781c4ad94
1 changed files with 2 additions and 1 deletions
|
@ -1981,6 +1981,7 @@ int32_t handleevents(void)
|
||||||
|
|
||||||
if (ev.key.type == SDL_KEYDOWN &&
|
if (ev.key.type == SDL_KEYDOWN &&
|
||||||
(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_BACKSPACE ||
|
ev.key.keysym.scancode == SDL_SCANCODE_BACKSPACE ||
|
||||||
ev.key.keysym.scancode == SDL_SCANCODE_TAB) &&
|
ev.key.keysym.scancode == SDL_SCANCODE_TAB) &&
|
||||||
((keyasciififoend+1)&(KEYFIFOSIZ-1)) != keyasciififoplc)
|
((keyasciififoend+1)&(KEYFIFOSIZ-1)) != keyasciififoplc)
|
||||||
|
@ -1988,7 +1989,7 @@ int32_t handleevents(void)
|
||||||
char keyvalue;
|
char keyvalue;
|
||||||
switch (ev.key.keysym.scancode)
|
switch (ev.key.keysym.scancode)
|
||||||
{
|
{
|
||||||
case SDL_SCANCODE_RETURN: keyvalue = '\n'; break;
|
case SDL_SCANCODE_RETURN: case SDL_SCANCODE_KP_ENTER: keyvalue = '\r'; 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;
|
||||||
default: keyvalue = 0; break;
|
default: keyvalue = 0; break;
|
||||||
|
|
Loading…
Reference in a new issue