aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-13 07:31:46 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-13 07:31:46 +0200
commitb1e0b7728bc0933f17509b8bfbc48f218f9990dc (patch)
tree8469241ab98b0586a08780bf5ca95f684da82cbf /src
parenteb255e68706c5fcc61bf17a81427c34505c3d519 (diff)
downloadminetest-b1e0b7728bc0933f17509b8bfbc48f218f9990dc.tar.gz
minetest-b1e0b7728bc0933f17509b8bfbc48f218f9990dc.tar.bz2
minetest-b1e0b7728bc0933f17509b8bfbc48f218f9990dc.zip
Fix keycode_to_keyname return value
Diffstat (limited to 'src')
-rw-r--r--src/keycode.cpp2
-rw-r--r--src/keycode.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/keycode.cpp b/src/keycode.cpp
index 323d12e74..052cd7dc6 100644
--- a/src/keycode.cpp
+++ b/src/keycode.cpp
@@ -206,7 +206,7 @@ static const char *KeyNames[] =
"-", "-", "-", "-", "-", "-", "-", "-", "Attn", "CrSel", "ExSel",
"Erase OEF", "Play", "Zoom", "PA1", "OEM Clear", "-" };
-const std::string &keycode_to_keyname(s32 keycode)
+const char *keycode_to_keyname(s32 keycode)
{
return KeyNames[keycode];
}
diff --git a/src/keycode.h b/src/keycode.h
index 2681e7efa..e64cb362c 100644
--- a/src/keycode.h
+++ b/src/keycode.h
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string>
irr::EKEY_CODE keyname_to_keycode(const char *name);
-const std::string &keycode_to_keyname(s32 keycode);
+const char *keycode_to_keyname(s32 keycode);
// Key configuration getter
irr::EKEY_CODE getKeySetting(const char *settingname);