[Scummvm-cvs-logs] scummvm master -> c293611f62d83359e3c780ce556859151900864b
clone2727
clone2727 at gmail.com
Mon Jun 2 04:38:39 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c293611f62 PEGASUS: Stop using num lock for a way to open the inventory drawer
Commit: c293611f62d83359e3c780ce556859151900864b
https://github.com/scummvm/scummvm/commit/c293611f62d83359e3c780ce556859151900864b
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2014-06-01T22:38:05-04:00
Commit Message:
PEGASUS: Stop using num lock for a way to open the inventory drawer
Changed paths:
engines/pegasus/input.cpp
diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp
index 283d554..3f16acc 100644
--- a/engines/pegasus/input.cpp
+++ b/engines/pegasus/input.cpp
@@ -57,7 +57,6 @@ InputDeviceManager::InputDeviceManager() {
_keyMap[Common::KEYCODE_p] = false;
_keyMap[Common::KEYCODE_TILDE] = false;
_keyMap[Common::KEYCODE_BACKQUOTE] = false;
- _keyMap[Common::KEYCODE_NUMLOCK] = false;
_keyMap[Common::KEYCODE_BACKSPACE] = false;
_keyMap[Common::KEYCODE_KP_MULTIPLY] = false;
_keyMap[Common::KEYCODE_LALT] = false;
@@ -113,7 +112,12 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) {
if (_keyMap[Common::KEYCODE_ESCAPE] || _keyMap[Common::KEYCODE_p])
currentBits |= (kRawButtonDown << kMod3ButtonShift);
- if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE] || _keyMap[Common::KEYCODE_NUMLOCK])
+ // The original also used clear (aka "num lock" on Mac keyboards) here, but it doesn't
+ // work right on most systems. Either SDL or the OS treats num lock specially and the
+ // events don't come as expected. In many cases, the key down event is sent many times
+ // causing the drawer to open and close constantly until pressed again. It only causes
+ // more grief than anything else.
+ if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE])
currentBits |= (kRawButtonDown << kLeftFireButtonShift);
if (_keyMap[Common::KEYCODE_BACKSPACE] || _keyMap[Common::KEYCODE_KP_MULTIPLY])
More information about the Scummvm-git-logs
mailing list