[Scummvm-git-logs] scummvm master -> 4ec113688351c3765ca5e8839346fdcee20f61a9

dreammaster noreply at scummvm.org
Fri Jan 19 06:29:48 UTC 2024


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:
4ec1136883 M4: Don't return ascii keys when Ctrl/Alt pressed


Commit: 4ec113688351c3765ca5e8839346fdcee20f61a9
    https://github.com/scummvm/scummvm/commit/4ec113688351c3765ca5e8839346fdcee20f61a9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-01-18T22:29:39-08:00

Commit Message:
M4: Don't return ascii keys when Ctrl/Alt pressed

Changed paths:
    engines/m4/platform/events.cpp


diff --git a/engines/m4/platform/events.cpp b/engines/m4/platform/events.cpp
index 29936f01789..96a9062a0cf 100644
--- a/engines/m4/platform/events.cpp
+++ b/engines/m4/platform/events.cpp
@@ -220,8 +220,10 @@ bool Events::util_kbd_check(int32 *parm1) {
 	if (is_mod_key(ks))
 		return false;
 
-	int key = (ks.ascii >= 32 && ks.ascii <= 127) ? ks.ascii : ks.keycode;
-	*parm1 = key | ((ks.flags & (Common::KBD_CTRL | Common::KBD_ALT)) << 16);
+	int flags = ks.flags & (Common::KBD_CTRL | Common::KBD_ALT);
+	int key = (ks.ascii >= 32 && ks.ascii <= 127 && !flags) ? ks.ascii : ks.keycode;
+	*parm1 = key | (flags << 16);
+
 	return true;
 }
 




More information about the Scummvm-git-logs mailing list