projects
/
quix0rs-blobwars.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dcd92d
)
Fix display of key names in the keyboard configuration screen.
author
Guus Sliepen
<guus@debian.org>
Sat, 8 Aug 2015 20:13:24 +0000
(22:13 +0200)
committer
Guus Sliepen
<guus@debian.org>
Sat, 8 Aug 2015 20:13:24 +0000
(22:13 +0200)
src/CKeyboard.cpp
patch
|
blob
|
history
diff --git
a/src/CKeyboard.cpp
b/src/CKeyboard.cpp
index 89e6e0ec8d710757f901994b329a05c192f7c453..955e503ce594131e20076ad2a6b507cb417eaf66 100644
(file)
--- a/
src/CKeyboard.cpp
+++ b/
src/CKeyboard.cpp
@@
-39,16
+39,18
@@
void Keyboard::setDefaultKeys()
control[CONTROL::MAP] = SDL_SCANCODE_TAB;
}
-const char *Keyboard::translateKey(int
key
)
+const char *Keyboard::translateKey(int
scancode
)
{
static char keyName[50];
keyName[0] = 0;
keyName[0] = '\0';
- if (
key
<= 0)
+ if (
scancode
<= 0)
{
return "...";
}
+
+ SDL_Keycode key = SDL_GetKeyFromScancode((SDL_Scancode)scancode);
strlcpy(keyName, _(SDL_GetKeyName(key)), sizeof keyName);