From d9e7fca83c7025d2a91ac5341fb9082ea2b8a0fb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 14 Nov 2018 20:57:30 -0800 Subject: GLK: FROTZ: Fix exiting when application is forcefully closed --- engines/glk/frotz/glk_interface.cpp | 2 +- engines/glk/frotz/processor.cpp | 2 +- engines/glk/frotz/processor_streams.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/glk/frotz') 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 -- cgit v1.2.3