aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/surface.cpp
diff options
context:
space:
mode:
authorThierry Crozat2012-06-30 20:47:29 +0100
committerThierry Crozat2012-06-30 20:48:22 +0100
commit335ba979a2e3aab9c1856bf84a18b60ab91de687 (patch)
treea866c9f911777a783f9fca785e35ec12360ca6e8 /engines/lure/surface.cpp
parent33c67caed16e0f99677fe0f4938660800e021a64 (diff)
downloadscummvm-rg350-335ba979a2e3aab9c1856bf84a18b60ab91de687.tar.gz
scummvm-rg350-335ba979a2e3aab9c1856bf84a18b60ab91de687.tar.bz2
scummvm-rg350-335ba979a2e3aab9c1856bf84a18b60ab91de687.zip
LURE: Fix engine crash in copy protection screen with AZERTY keyboard
Fixes bug #3539031 - "LURE: Crash at Copy Protection Screen". This reverts the previous fix which only worked for QWERTY keyboards and made the issue worse for AZERTY keyboards. It now uses the ASCII code instead of the keycode for the sanity check.
Diffstat (limited to 'engines/lure/surface.cpp')
-rw-r--r--engines/lure/surface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index 7af9d665de..0f13d87fbc 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -1349,7 +1349,7 @@ bool CopyProtectionDialog::show() {
while (!engine.shouldQuit()) {
while (events.pollEvent() && (_charIndex < 4)) {
- if (events.type() == Common::EVENT_KEYDOWN && !(events.event().kbd.flags & Common::KBD_NON_STICKY)) {
+ if (events.type() == Common::EVENT_KEYDOWN) {
if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) {
// Remove the last number typed
--_charIndex;
@@ -1360,8 +1360,8 @@ bool CopyProtectionDialog::show() {
(*tmpHotspot)->copyTo(&screen.screen());
screen.update();
- } else if ((events.event().kbd.keycode >= Common::KEYCODE_0) &&
- (events.event().kbd.keycode <= Common::KEYCODE_9)) {
+ } else if ((events.event().kbd.ascii >= '0') &&
+ (events.event().kbd.ascii <= '9')) {
HotspotsList::iterator tmpHotspot = _hotspots.begin();
for (int i = 0; i < _charIndex + 3; i++)
++tmpHotspot;