mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 20:07:11 +00:00
GRIM: Filter out of range keycodes
This commit is contained in:
parent
1fd47cc8c2
commit
7da3d486d2
@ -291,6 +291,10 @@ void GrimEngine::handleChars(Common::EventType operation, const Common::KeyState
|
||||
|
||||
void GrimEngine::handleControls(Common::EventType operation, const Common::KeyState &key) {
|
||||
// If we're not supposed to handle the key then don't
|
||||
if ((int)key.keycode >= KEYCODE_EXTRA_LAST) {
|
||||
warning("keycode: %d not enabled", key.keycode);
|
||||
return;
|
||||
}
|
||||
if (!_controlsEnabled[key.keycode])
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user