From bcb854370dd848152526295b3c3f8406cef040bd Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 9 Oct 2022 23:22:39 +0100 Subject: [PATCH] AGS: key plugin callback and game. vars must use "CompatKey" From upstream 555a3060491523d2c236f0bbb77b981eab2d4359 --- engines/ags/engine/main/game_run.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/ags/engine/main/game_run.cpp b/engines/ags/engine/main/game_run.cpp index 85f6429a3c3..fb77bff51de 100644 --- a/engines/ags/engine/main/game_run.cpp +++ b/engines/ags/engine/main/game_run.cpp @@ -314,7 +314,7 @@ bool run_service_key_controls(KeyInput &out_key) { if (ki.Key == eAGSKeyCodeNone) return false; // should skip this key event - // Use backward-compatible combined key for service checks + // Use backward-compatible combined key (comparable with script variables) eAGSKeyCode agskey = ki.CompatKey; // LAlt or RAlt + Enter/Return if ((cur_mod == Common::KBD_ALT) && agskey == eAGSKeyCodeReturn) { @@ -417,7 +417,8 @@ static void check_keyboard_controls() { if (!run_service_key_controls(ki)) { return; } - const eAGSKeyCode agskey = ki.Key; + // Use backward-compatible combined key (comparable with script variables) + const eAGSKeyCode agskey = ki.CompatKey; // Then, check cutscene skip check_skip_cutscene_keypress(agskey); if (_GP(play).fast_forward) {