mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Minor cleanups.
in_keys.c: Key_ConsoleBindable: remove redundant check, this is now handled by Key_KeynumToString/Key_StringToKeynum. in_sdl.c: IN_SendKeyEvents: use a single method for checking whether we have a keydown or keyup event. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1047 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
0472529285
commit
a7f9e3988b
2 changed files with 2 additions and 5 deletions
|
@ -636,12 +636,12 @@ void IN_SendKeyEvents (void)
|
|||
else
|
||||
lastKeyDown = 0;
|
||||
|
||||
Key_Event (sym, event.key.state == SDL_PRESSED);
|
||||
Key_Event (sym, event.type == SDL_KEYDOWN);
|
||||
break;
|
||||
#else
|
||||
sym = IN_SDL_KeysymToQuakeKey(event.key.keysym.sym);
|
||||
|
||||
Key_Event (sym, event.key.state == SDL_PRESSED);
|
||||
Key_Event (sym, event.type == SDL_KEYDOWN);
|
||||
|
||||
if (event.type == SDL_KEYDOWN && !Key_ConsoleBindable(sym) &&
|
||||
event.key.keysym.unicode != 0 && (event.key.keysym.unicode & 0xFF80) == 0)
|
||||
|
|
|
@ -1140,9 +1140,6 @@ Key_ConsoleBindable
|
|||
*/
|
||||
qboolean Key_ConsoleBindable(int key)
|
||||
{
|
||||
if (key < 0 || key > 255)
|
||||
return false;
|
||||
|
||||
if (Key_StringToKeynum(Key_KeynumToString(key)) == -1)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue