AGS: key plugin callback and game. vars must use "CompatKey"

From upstream 555a3060491523d2c236f0bbb77b981eab2d4359
This commit is contained in:
Thierry Crozat 2022-10-09 23:22:39 +01:00
parent 0927821afd
commit bcb854370d

View File

@ -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) {