diff options
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/tads/os_glk.cpp | 2 | ||||
-rw-r--r-- | engines/glk/tads/tads.cpp | 1 | ||||
-rw-r--r-- | engines/glk/tads/tads2/tads2.cpp | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/glk/tads/os_glk.cpp b/engines/glk/tads/os_glk.cpp index 884703c54e..90a5f00d6a 100644 --- a/engines/glk/tads/os_glk.cpp +++ b/engines/glk/tads/os_glk.cpp @@ -92,7 +92,7 @@ int os_init(int *argc, char *argv[], const char *prompt, /* close statuswin; reopened on request */ g_vm->glk_window_close(statuswin, 0); - statuswin = NULL; + statuswin = nullptr; g_vm->glk_set_window(mainwin); diff --git a/engines/glk/tads/tads.cpp b/engines/glk/tads/tads.cpp index b021b02c84..6ce2915469 100644 --- a/engines/glk/tads/tads.cpp +++ b/engines/glk/tads/tads.cpp @@ -32,7 +32,6 @@ TADS *g_vm; TADS::TADS(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc) { g_vm = this; - os_init(nullptr, nullptr, 0, 0, 0); } bool TADS::hasFeature(EngineFeature f) const { diff --git a/engines/glk/tads/tads2/tads2.cpp b/engines/glk/tads/tads2/tads2.cpp index 6203900642..547cb0f748 100644 --- a/engines/glk/tads/tads2/tads2.cpp +++ b/engines/glk/tads/tads2/tads2.cpp @@ -23,6 +23,7 @@ #include "glk/tads/tads2/tads2.h" #include "glk/tads/tads2/appctx.h" #include "glk/tads/tads2/runtime_app.h" +#include "glk/tads/tads2/os.h" namespace Glk { namespace TADS { @@ -32,11 +33,18 @@ TADS2::TADS2(OSystem *syst, const GlkGameDescription &gameDesc) : TADS(syst, gam } void TADS2::runGame() { + // Initialize the OS layer + os_init(nullptr, nullptr, 0, 0, 0); + os_instbrk(true); + char name[255]; strcpy(name, getFilename().c_str()); char *argv[2] = { nullptr, name }; trdmain(2, argv, nullptr, ".sav"); + + os_instbrk(false); + os_uninit(); } } // End of namespace TADS2 |