diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-09 17:13:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-09 17:13:34 +0300 |
commit | e6bb33fad96878b66ecb32c104d06cd6e5ea9e77 (patch) | |
tree | 9294304f6480140a1cb0383df395893ae7009db7 /src/gui/setup_keyboard.cpp | |
parent | 443813146a327504a07a507f43117d92296ca8a7 (diff) | |
download | manaplus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.tar.gz manaplus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.tar.bz2 manaplus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.tar.xz manaplus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.zip |
Add limited support for keys unknown for SDL.
This keys can be assigned to simple actions and cant be modifier keys.
Diffstat (limited to 'src/gui/setup_keyboard.cpp')
-rw-r--r-- | src/gui/setup_keyboard.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp index aae1cd183..e9ce1b704 100644 --- a/src/gui/setup_keyboard.cpp +++ b/src/gui/setup_keyboard.cpp @@ -201,11 +201,9 @@ void Setup_Keyboard::refreshAssignedKey(int index) } else { - std::string caption; - char *temp = SDL_GetKeyName( - static_cast<SDLKey>(keyboard.getKeyValue(index))); - caption = keyboard.getKeyCaption(index) + ": " + toString(temp); - mKeyListModel->setElementAt(index, caption); + mKeyListModel->setElementAt(index, strprintf("%s: %s", + keyboard.getKeyCaption(index).c_str(), + keyboard.getKeyStringLong(index).c_str())); } } |