Double binding fix

This commit is contained in:
iota97 committed 2021-09-08 08:54:59 +02:00
1 parent f92c33a48c
commit 7b33325cac
3 files changed
+29 -4

No files matched your search

+8 -4
View File
@@ -166,13 +166,17 @@ void SingleControlMapper::MappedCallback(KeyDef kdf) {
replaceAllButton_->SetFocus();
break;
case REPLACEONE:
KeyMap::g_controllerMap[pspKey_][actionIndex_] = kdf;
KeyMap::g_controllerMapGeneration++;
if (actionIndex_ < rows_.size())
{
bool success = KeyMap::ReplaceSingleKeyMapping(pspKey_, actionIndex_, kdf);
if (!success) {
replaceAllButton_->SetFocus(); // Last got removed as a duplicate
} else if (actionIndex_ < rows_.size()) {
rows_[actionIndex_]->SetFocus();
else
} else {
SetFocus();
}
break;
}
default:
SetFocus();
break;