aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2015-08-07 06:02:06 +0200
committerKahrl <kahrl@gmx.net>2015-08-07 06:02:06 +0200
commit63b12f1f048d83632069a4d0b3d2649cf9be7904 (patch)
tree8113c62996d36f285ffdb40913ece20f09f99b61 /src
parent5c3c965c1a6e1fb5957d441c2d04d8470b80d710 (diff)
downloadminetest-63b12f1f048d83632069a4d0b3d2649cf9be7904.tar.gz
minetest-63b12f1f048d83632069a4d0b3d2649cf9be7904.tar.bz2
minetest-63b12f1f048d83632069a4d0b3d2649cf9be7904.zip
Fix camera updates being toggled by N key in release mode (#2762)
Diffstat (limited to 'src')
-rw-r--r--src/defaultsettings.cpp2
-rw-r--r--src/keycode.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 4674b2b77..40afc7dd3 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -58,7 +58,7 @@ void set_default_settings(Settings *settings)
#if DEBUG
"KEY_F4");
#else
- "none");
+ "");
#endif
settings->setDefault("keymap_toggle_debug", "KEY_F5");
settings->setDefault("keymap_toggle_profiler", "KEY_F6");
diff --git a/src/keycode.cpp b/src/keycode.cpp
index 1ec325961..990dee339 100644
--- a/src/keycode.cpp
+++ b/src/keycode.cpp
@@ -256,7 +256,11 @@ KeyPress::KeyPress() :
KeyPress::KeyPress(const char *name)
{
- if (strlen(name) > 4) {
+ if (name[0] == 0) {
+ Key = irr::KEY_KEY_CODES_COUNT;
+ Char = L'\0';
+ return;
+ } else if (strlen(name) > 4) {
try {
Key = keyname_to_keycode(name);
m_name = name;