aboutsummaryrefslogtreecommitdiff
path: root/src/keycode.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2016-10-28 15:50:23 +0200
committersfan5 <sfan5@live.de>2016-10-28 15:50:23 +0200
commit6d7b95d76355334ccb57638d35b123fb49456cf6 (patch)
treec1c38ac5511cf72995c37c1a92249760aeb4f2ef /src/keycode.cpp
parent7252c803e0708bd8511a5b51333983aa24a76cb2 (diff)
downloadminetest-6d7b95d76355334ccb57638d35b123fb49456cf6.tar.gz
minetest-6d7b95d76355334ccb57638d35b123fb49456cf6.tar.bz2
minetest-6d7b95d76355334ccb57638d35b123fb49456cf6.zip
Add missing keyname_to_keycode function (needed on Android)
When rewriting keycode.cpp I overlooked this function, fixes #4683 completely
Diffstat (limited to 'src/keycode.cpp')
-rw-r--r--src/keycode.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/keycode.cpp b/src/keycode.cpp
index 48d010cf4..2e211ad59 100644
--- a/src/keycode.cpp
+++ b/src/keycode.cpp
@@ -385,3 +385,8 @@ void clearKeyCache()
{
g_key_setting_cache.clear();
}
+
+irr::EKEY_CODE keyname_to_keycode(const char *name)
+{
+ return lookup_keyname(name).Key;
+}