KEYMAPPER: Have clicking on another remap button disable remapping

Prevents the remapping code from being activated twice (throwing an assertion)
This commit is contained in:
Matthew Hoops 2014-02-20 01:06:50 -05:00
parent 29b9bba62c
commit 5159996cec

View File

@ -258,6 +258,12 @@ void RemapDialog::startRemapping(uint i) {
if (_topAction + i >= _currentActions.size())
return;
if (_keymapper->isRemapping()) {
// Handle a second click on the button as a stop to remapping
stopRemapping(true);
return;
}
_remapTimeout = g_system->getMillis() + kRemapTimeoutDelay;
Action *activeRemapAction = _currentActions[_topAction + i].action;
_keymapWidgets[i].keyButton->setLabel("...");