[Scummvm-git-logs] scummvm master -> 31bf101af1df3f665b7ab407082287a9ed58ed2d
dreammaster
dreammaster at scummvm.org
Sat Aug 21 17:49:53 UTC 2021
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:
31bf101af1 AGS: Fix quitting via abort key
Commit: 31bf101af1df3f665b7ab407082287a9ed58ed2d
https://github.com/scummvm/scummvm/commit/31bf101af1df3f665b7ab407082287a9ed58ed2d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-08-21T10:49:13-07:00
Commit Message:
AGS: Fix quitting via abort key
Changed paths:
engines/ags/engine/main/quit.cpp
engines/ags/events.cpp
diff --git a/engines/ags/engine/main/quit.cpp b/engines/ags/engine/main/quit.cpp
index 9785efcff1..0d42ee4906 100644
--- a/engines/ags/engine/main/quit.cpp
+++ b/engines/ags/engine/main/quit.cpp
@@ -152,9 +152,8 @@ QuitReason quit_check_for_error_state(const char *&qmsg, String &alertis) {
}
void quit_message_on_exit(const String &qmsg, String &alertis, QuitReason qreason) {
- // successful exit displays no messages (because Windoze closes the dos-box
- // if it is empty).
- if ((qreason & kQuitKind_NormalExit) == 0 && !_G(handledErrorInEditor)) {
+ // successful exit or user abort displays no messages
+ if ((qreason & (kQuitKind_NormalExit | kQuit_UserAbort)) == 0 && !_G(handledErrorInEditor)) {
// Display the message (at this point the window still exists)
sprintf(_G(pexbuf), "%s\n", qmsg.GetCStr());
alertis.Append(_G(pexbuf));
diff --git a/engines/ags/events.cpp b/engines/ags/events.cpp
index 55e2ebb91c..d9a4301f02 100644
--- a/engines/ags/events.cpp
+++ b/engines/ags/events.cpp
@@ -315,9 +315,6 @@ AGS3::eAGSKeyCode EventsManager::scummvm_key_to_ags_key(const Common::Event &eve
if (event.type != Common::EVENT_KEYDOWN)
return AGS3::eAGSKeyCodeNone;
- if (event.kbd.ascii >= 32 && event.kbd.ascii <= 127)
- return static_cast<AGS3::eAGSKeyCode>(event.kbd.ascii);
-
const Common::KeyCode sym = event.kbd.keycode;
const uint16 mod = event.kbd.flags;
@@ -329,6 +326,9 @@ AGS3::eAGSKeyCode EventsManager::scummvm_key_to_ags_key(const Common::Event &eve
return static_cast<AGS3::eAGSKeyCode>(AGS_EXT_KEY_SHIFT + (sym - Common::KEYCODE_a) + 1);
}
+ if (event.kbd.ascii >= 32 && event.kbd.ascii <= 127)
+ return static_cast<AGS3::eAGSKeyCode>(event.kbd.ascii);
+
// Remaining codes may match or not, but we use a big table anyway.
// TODO: this is code by [sonneveld],
// double check that we must use scan codes here, maybe can use sdl key (sym) too?
More information about the Scummvm-git-logs
mailing list