aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorscurest <scurest@users.noreply.github.com>2021-10-10 15:51:08 -0500
committerGitHub <noreply@github.com>2021-10-10 22:51:08 +0200
commita8613af2bd3ba0cc9d52b6a5d63899cda7ca2864 (patch)
tree775ff0b9929abea8f14789ca3261a5075f0f812e /src/frontend
parente0052049b0c2ed3386b925ee68ae529e2dbe1a44 (diff)
InputConfigDialog: more DRY (#1238)
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp b/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp
index 4ed843e..12b2206 100644
--- a/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp
+++ b/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp
@@ -201,19 +201,19 @@ void InputConfigDialog::populatePage(QWidget* page, int num, const char** labels
void InputConfigDialog::on_InputConfigDialog_accepted()
{
- for (int i = 0; i < 12; i++)
+ for (int i = 0; i < keypad_num; i++)
{
Config::KeyMapping[dskeyorder[i]] = keypadKeyMap[i];
Config::JoyMapping[dskeyorder[i]] = keypadJoyMap[i];
}
- for (int i = 0; i < 2; i++)
+ for (int i = 0; i < hk_addons_num; i++)
{
Config::HKKeyMapping[hk_addons[i]] = addonsKeyMap[i];
Config::HKJoyMapping[hk_addons[i]] = addonsJoyMap[i];
}
- for (int i = 0; i < 9; i++)
+ for (int i = 0; i < hk_general_num; i++)
{
Config::HKKeyMapping[hk_general[i]] = hkGeneralKeyMap[i];
Config::HKJoyMapping[hk_general[i]] = hkGeneralJoyMap[i];