aboutsummaryrefslogtreecommitdiff
path: root/src/guiKeyChangeMenu.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-11-10 12:26:19 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-11-10 12:26:19 +1000
commit987e565eeb80f0fe2825267de728f8a1989a051d (patch)
tree27e39b75fe16e5aa58e1847f2b769a7f437c2429 /src/guiKeyChangeMenu.cpp
parent18c583ee0b7548d5ea5d5ccd3085008d94620e5c (diff)
downloadminetest-987e565eeb80f0fe2825267de728f8a1989a051d.tar.gz
minetest-987e565eeb80f0fe2825267de728f8a1989a051d.tar.bz2
minetest-987e565eeb80f0fe2825267de728f8a1989a051d.zip
Create faster key cache for main game loop (client)
Diffstat (limited to 'src/guiKeyChangeMenu.cpp')
-rw-r--r--src/guiKeyChangeMenu.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp
index 85222431e..8b0bb8278 100644
--- a/src/guiKeyChangeMenu.cpp
+++ b/src/guiKeyChangeMenu.cpp
@@ -32,8 +32,12 @@
#include "settings.h"
#include <algorithm>
+#include "mainmenumanager.h" // for g_gamecallback
+
#define KMaxButtonPerColumns 12
+extern MainGameCallback *g_gamecallback;
+
enum
{
GUI_ID_BACK_BUTTON = 101, GUI_ID_ABORT_BUTTON, GUI_ID_SCROLL_BAR,
@@ -234,7 +238,11 @@ bool GUIKeyChangeMenu::acceptInput()
if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
g_settings->setBool("doubletap_jump", ((gui::IGUICheckBox*)e)->isChecked());
}
+
clearKeyCache();
+
+ g_gamecallback->signalKeyConfigChange();
+
return true;
}