InputConfigDialog: more DRY (#1238)
This commit is contained in:
parent
e0052049b0
commit
a8613af2bd
|
@ -201,19 +201,19 @@ void InputConfigDialog::populatePage(QWidget* page, int num, const char** labels
|
||||||
|
|
||||||
void InputConfigDialog::on_InputConfigDialog_accepted()
|
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::KeyMapping[dskeyorder[i]] = keypadKeyMap[i];
|
||||||
Config::JoyMapping[dskeyorder[i]] = keypadJoyMap[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::HKKeyMapping[hk_addons[i]] = addonsKeyMap[i];
|
||||||
Config::HKJoyMapping[hk_addons[i]] = addonsJoyMap[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::HKKeyMapping[hk_general[i]] = hkGeneralKeyMap[i];
|
||||||
Config::HKJoyMapping[hk_general[i]] = hkGeneralJoyMap[i];
|
Config::HKJoyMapping[hk_general[i]] = hkGeneralJoyMap[i];
|
||||||
|
|
Loading…
Reference in New Issue