diff options
author | Paul Gilbert | 2019-11-09 20:55:47 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-11-11 18:20:30 -0800 |
commit | f3b02a115fbacfffb76065df881d5cbaa28c17da (patch) | |
tree | 62adda057761e5bdcfe6470763858905314260fc /engines/glk/glk.h | |
parent | ab5939ba443b31cbecb727825346a331a84856a7 (diff) | |
download | scummvm-rg350-f3b02a115fbacfffb76065df881d5cbaa28c17da.tar.gz scummvm-rg350-f3b02a115fbacfffb76065df881d5cbaa28c17da.tar.bz2 scummvm-rg350-f3b02a115fbacfffb76065df881d5cbaa28c17da.zip |
GLK: ARCHETYPE: Cleaner exit when game is quit
Diffstat (limited to 'engines/glk/glk.h')
-rw-r--r-- | engines/glk/glk.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/glk/glk.h b/engines/glk/glk.h index 79e5425e81..8daa7ce5d7 100644 --- a/engines/glk/glk.h +++ b/engines/glk/glk.h @@ -80,6 +80,7 @@ protected: int _loadSaveSlot; Common::File _gameFile; PCSpeaker *_pcSpeaker; + bool _quitFlag; // Engine APIs virtual Common::Error run(); @@ -241,6 +242,21 @@ public: * Set a random number seed */ void setRandomNumberSeed(uint seed) { _random.setSeed(seed); } + + /** + * Flags to quit the game + */ + void quitGame() { + _quitFlag = true; + Engine::quitGame(); + } + + /** + * Returns true if the game should be quit + */ + bool shouldQuit() const { + return _quitFlag || Engine::shouldQuit(); + } }; extern GlkEngine *g_vm; |