summaryrefslogtreecommitdiff
path: root/src/input/keyboardconfig.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-29 17:00:54 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-29 17:00:54 +0300
commitc98c07fc7da05df3c53fde98ff95b1fb959e1213 (patch)
tree1d17077a8cdb4d719d8835c64158814a61edc5ba /src/input/keyboardconfig.cpp
parent783b6348f4a4bc658cca214537a43d911c91f3b3 (diff)
downloadplus-c98c07fc7da05df3c53fde98ff95b1fb959e1213.tar.gz
plus-c98c07fc7da05df3c53fde98ff95b1fb959e1213.tar.bz2
plus-c98c07fc7da05df3c53fde98ff95b1fb959e1213.tar.xz
plus-c98c07fc7da05df3c53fde98ff95b1fb959e1213.zip
Add constexpr into keyboardconfig.
Diffstat (limited to 'src/input/keyboardconfig.cpp')
-rw-r--r--src/input/keyboardconfig.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp
index ecd563656..3405ad5c4 100644
--- a/src/input/keyboardconfig.cpp
+++ b/src/input/keyboardconfig.cpp
@@ -59,20 +59,6 @@ void KeyboardConfig::deinit()
mActiveKeys2 = nullptr;
}
-int KeyboardConfig::getKeyValueFromEvent(const SDL_Event &event)
-{
-#ifdef USE_SDL2
- return event.key.keysym.scancode;
-#else // USE_SDL2
-
- if (event.key.keysym.sym)
- return CAST_S32(event.key.keysym.sym);
- else if (event.key.keysym.scancode > 1)
- return -event.key.keysym.scancode;
- return 0;
-#endif // USE_SDL2
-}
-
InputActionT KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp)
{
const int keyValue = getKeyValueFromEvent(event);
@@ -149,16 +135,6 @@ std::string KeyboardConfig::getKeyShortString(const std::string &key)
return key;
}
-SDLKey KeyboardConfig::getKeyFromEvent(const SDL_Event &event)
-{
-#ifdef USE_SDL2
- return event.key.keysym.scancode;
-#else // USE_SDL2
-
- return event.key.keysym.sym;
-#endif // USE_SDL2
-}
-
KeysVector *KeyboardConfig::getActionVector(const SDL_Event &event)
{
const int i = getKeyValueFromEvent(event);