mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
AGS: Fix quitting via abort key
This commit is contained in:
parent
292c095582
commit
31bf101af1
@ -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));
|
||||
|
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user