aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2014-02-20 01:06:50 -0500
committerMatthew Hoops2014-02-20 01:06:50 -0500
commit5159996cecce2ae0d9e8f2b8567fd4ffd93ee6b4 (patch)
treeeed350be14640cbfc7d6c60b8a57b19747b0aa1e
parent29b9bba62cf47491801c2d49e1dec581cfdec9df (diff)
downloadscummvm-rg350-5159996cecce2ae0d9e8f2b8567fd4ffd93ee6b4.tar.gz
scummvm-rg350-5159996cecce2ae0d9e8f2b8567fd4ffd93ee6b4.tar.bz2
scummvm-rg350-5159996cecce2ae0d9e8f2b8567fd4ffd93ee6b4.zip
KEYMAPPER: Have clicking on another remap button disable remapping
Prevents the remapping code from being activated twice (throwing an assertion)
-rw-r--r--backends/keymapper/remap-dialog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index 2d39bcd3b2..3aa3647048 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -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("...");