diff options
author | Paul Gilbert | 2018-11-23 21:08:53 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | 4a3f517b719d4ee07fab8f704d5884c52c0da4c1 (patch) | |
tree | 4abe34a33d3caf65e8564052561fd6f342a7c26c | |
parent | c7a632ae2ed6a11500bc77b53540bb7ea23cb0d1 (diff) | |
download | scummvm-rg350-4a3f517b719d4ee07fab8f704d5884c52c0da4c1.tar.gz scummvm-rg350-4a3f517b719d4ee07fab8f704d5884c52c0da4c1.tar.bz2 scummvm-rg350-4a3f517b719d4ee07fab8f704d5884c52c0da4c1.zip |
GLK: FROTZ: Prompt for exit when game quits
-rw-r--r-- | engines/glk/frotz/frotz.cpp | 5 | ||||
-rw-r--r-- | engines/glk/frotz/processor.h | 17 |
2 files changed, 17 insertions, 5 deletions
diff --git a/engines/glk/frotz/frotz.cpp b/engines/glk/frotz/frotz.cpp index 95cdb22ee9..d3b0749649 100644 --- a/engines/glk/frotz/frotz.cpp +++ b/engines/glk/frotz/frotz.cpp @@ -44,6 +44,11 @@ void Frotz::runGame(Common::SeekableReadStream *gameFile) { // Game loop interpret(); + + if (!shouldQuit()) { + flush_buffer(); + glk_exit(); + } } void Frotz::initialize() { diff --git a/engines/glk/frotz/processor.h b/engines/glk/frotz/processor.h index 5f61a2e658..77a673df9d 100644 --- a/engines/glk/frotz/processor.h +++ b/engines/glk/frotz/processor.h @@ -169,11 +169,6 @@ private: * @{ */ - /** - * Copy the contents of the text buffer to the output streams. - */ - void flush_buffer(); - /** * High level output function. */ @@ -1545,6 +1540,18 @@ protected: void z_store(); /**@}*/ + + /** + * \defgroup Input support methods + * @{ + */ + + /** + * Copy the contents of the text buffer to the output streams. + */ + void flush_buffer(); + + /**@}*/ public: /** * Constructor |