mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-11-17 19:24:05 +01:00
RMG: correct remove duplicate keybindings in SettingsDialog
This commit is contained in:
1 parent
30495795cd
commit
5c5cc8453d
1 file changed
+22
-4
@@ -1139,16 +1139,22 @@ void SettingsDialog::on_KeybindButton_KeybindingChanged(KeybindButton* button)
|
||||
return;
|
||||
}
|
||||
|
||||
KeybindButton* keybindButtons[] =
|
||||
QList<KeybindButton*> rombrowserKeybindButtons =
|
||||
{
|
||||
this->startRomKeyButton,
|
||||
this->startComboKeyButton,
|
||||
this->shutdownKeyButton,
|
||||
this->refreshRomListKeyButton,
|
||||
this->exitKeyButton,
|
||||
this->settingsKeyButton,
|
||||
this->refreshRomListKeyButton,
|
||||
};
|
||||
|
||||
QList<KeybindButton*> emulationKeybindButtons =
|
||||
{
|
||||
this->shutdownKeyButton,
|
||||
this->softResetKeyButton,
|
||||
this->hardResetKeyButton,
|
||||
this->pauseKeyButton,
|
||||
this->pauseKeyButton,
|
||||
this->generateBitmapKeyButton,
|
||||
this->limitFPSKeyButton,
|
||||
this->saveStateKeyButton,
|
||||
@@ -1167,10 +1173,22 @@ void SettingsDialog::on_KeybindButton_KeybindingChanged(KeybindButton* button)
|
||||
this->saveState7KeyButton,
|
||||
this->saveState8KeyButton,
|
||||
this->saveState9KeyButton,
|
||||
this->exitKeyButton,
|
||||
this->settingsKeyButton,
|
||||
this->fullscreenKeyButton,
|
||||
};
|
||||
|
||||
|
||||
QList<KeybindButton*> keybindButtons;
|
||||
|
||||
if (rombrowserKeybindButtons.contains(button))
|
||||
{
|
||||
keybindButtons.append(rombrowserKeybindButtons);
|
||||
}
|
||||
if (emulationKeybindButtons.contains(button))
|
||||
{
|
||||
keybindButtons.append(emulationKeybindButtons);
|
||||
}
|
||||
|
||||
for (KeybindButton* keybindButton : keybindButtons)
|
||||
{
|
||||
if (keybindButton != button)
|
||||
|
||||
Reference in new issue
Block a user