summaryrefslogtreecommitdiff
path: root/src/client/inputhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/inputhandler.cpp')
-rw-r--r--src/client/inputhandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/inputhandler.cpp b/src/client/inputhandler.cpp
index 29c68cf01..2692e9f1e 100644
--- a/src/client/inputhandler.cpp
+++ b/src/client/inputhandler.cpp
@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/numeric.h"
#include "inputhandler.h"
#include "gui/mainmenumanager.h"
+#include "hud.h"
void KeyCache::populate_nonchanging()
{
@@ -76,7 +77,7 @@ void KeyCache::populate()
key[KeyType::QUICKTUNE_INC] = getKeySetting("keymap_quicktune_inc");
key[KeyType::QUICKTUNE_DEC] = getKeySetting("keymap_quicktune_dec");
- for (int i = 0; i < 23; i++) {
+ for (int i = 0; i < HUD_HOTBAR_ITEMCOUNT_MAX; i++) {
std::string slot_key_name = "keymap_slot" + std::to_string(i + 1);
key[KeyType::SLOT_1 + i] = getKeySetting(slot_key_name.c_str());
}