[Scummvm-git-logs] scummvm master -> 8e7500dcb8f0f60854e79255f1722cd06e2ba7bd
tag2015
noreply at scummvm.org
Sat Sep 21 00:49:19 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:
8e7500dcb8 AGS: Fix keystrokes not registering in a few games
Commit: 8e7500dcb8f0f60854e79255f1722cd06e2ba7bd
https://github.com/scummvm/scummvm/commit/8e7500dcb8f0f60854e79255f1722cd06e2ba7bd
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2024-09-21T02:20:25+02:00
Commit Message:
AGS: Fix keystrokes not registering in a few games
Some games expect the character equivalent to be saved in the Text
field in KeyInput.
Fixes text input not working in An English Haunting, Perfect Tides
Station to Station, Carnival and others
Changed paths:
engines/ags/engine/ac/sys_events.cpp
diff --git a/engines/ags/engine/ac/sys_events.cpp b/engines/ags/engine/ac/sys_events.cpp
index abcc7d8c165..15607380a52 100644
--- a/engines/ags/engine/ac/sys_events.cpp
+++ b/engines/ags/engine/ac/sys_events.cpp
@@ -67,10 +67,11 @@ static void(*_on_switchout_callback)(void) = nullptr;
KeyInput ags_keycode_from_scummvm(const Common::Event &event, bool old_keyhandle) {
KeyInput ki;
+ snprintf(ki.Text, KeyInput::UTF8_ARR_SIZE, "%c", event.kbd.ascii);
ki.UChar = event.kbd.ascii;
ki.Key = ::AGS::g_events->scummvm_key_to_ags_key(event, ki.Mod, old_keyhandle);
ki.CompatKey = ::AGS::g_events->scummvm_key_to_ags_key(event, ki.Mod, true);
- if (ki.CompatKey == eAGSKeyCodeNone)
+ if (!old_keyhandle && ki.CompatKey == eAGSKeyCodeNone)
ki.CompatKey = ki.Key;
return ki;
}
More information about the Scummvm-git-logs
mailing list