[Scummvm-cvs-logs] scummvm master -> 335ba979a2e3aab9c1856bf84a18b60ab91de687

criezy criezy at scummvm.org
Sat Jun 30 21:50:33 CEST 2012


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:
335ba979a2 LURE: Fix engine crash in copy protection screen with AZERTY keyboard


Commit: 335ba979a2e3aab9c1856bf84a18b60ab91de687
    https://github.com/scummvm/scummvm/commit/335ba979a2e3aab9c1856bf84a18b60ab91de687
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2012-06-30T12:48:22-07:00

Commit Message:
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.

Changed paths:
    engines/lure/surface.cpp



diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index 7af9d66..0f13d87 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;






More information about the Scummvm-git-logs mailing list