aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/glk/frotz/frotz.cpp5
-rw-r--r--engines/glk/frotz/processor.h17
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