diff options
author | Paul Gilbert | 2018-11-14 20:57:30 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | d9e7fca83c7025d2a91ac5341fb9082ea2b8a0fb (patch) | |
tree | 836bc0913d67c3f828369dd3d1b3affa75b67937 /engines/glk/frotz | |
parent | af081ad322649918c205e03e4dd29991547981e0 (diff) | |
download | scummvm-rg350-d9e7fca83c7025d2a91ac5341fb9082ea2b8a0fb.tar.gz scummvm-rg350-d9e7fca83c7025d2a91ac5341fb9082ea2b8a0fb.tar.bz2 scummvm-rg350-d9e7fca83c7025d2a91ac5341fb9082ea2b8a0fb.zip |
GLK: FROTZ: Fix exiting when application is forcefully closed
Diffstat (limited to 'engines/glk/frotz')
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 2 | ||||
-rw-r--r-- | engines/glk/frotz/processor.cpp | 2 | ||||
-rw-r--r-- | engines/glk/frotz/processor_streams.cpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 6a0d510d85..292409ff7a 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -155,7 +155,7 @@ void GlkInterface::initialize() { // Use the ms-dos interpreter number for v6, because that's the // kind of graphics files we understand. Otherwise, use DEC. - h_interpreter_number = h_version == 6 ? INTERP_MSDOS : INTERP_DEC_20; + h_interpreter_number = h_version == 6 ? INTERP_MSDOS : INTERP_AMIGA; h_interpreter_version = 'F'; { diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp index eaa7310fc7..343299e27c 100644 --- a/engines/glk/frotz/processor.cpp +++ b/engines/glk/frotz/processor.cpp @@ -285,7 +285,7 @@ void Processor::interpret() { if (end_of_sound_flag) end_of_sound(); #endif - } while (!_finished); + } while (!shouldQuit() && !_finished); _finished--; } diff --git a/engines/glk/frotz/processor_streams.cpp b/engines/glk/frotz/processor_streams.cpp index 8413f4bb6e..581eb1e928 100644 --- a/engines/glk/frotz/processor_streams.cpp +++ b/engines/glk/frotz/processor_streams.cpp @@ -182,6 +182,8 @@ continue_input: key = replay_read_input(buf); else key = console_read_input(max, buf, timeout, key != ZC_BAD); + if (shouldQuit()) + return ZC_BAD; } while (key == ZC_BAD); // Copy input line to the command file |