diff options
author | Matthew Hoops | 2014-02-20 01:06:50 -0500 |
---|---|---|
committer | Matthew Hoops | 2014-02-20 01:06:50 -0500 |
commit | 5159996cecce2ae0d9e8f2b8567fd4ffd93ee6b4 (patch) | |
tree | eed350be14640cbfc7d6c60b8a57b19747b0aa1e /backends/keymapper | |
parent | 29b9bba62cf47491801c2d49e1dec581cfdec9df (diff) | |
download | scummvm-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)
Diffstat (limited to 'backends/keymapper')
-rw-r--r-- | backends/keymapper/remap-dialog.cpp | 6 |
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("..."); |