diff options
author | Paul Gilbert | 2019-05-18 17:14:12 -1000 |
---|---|---|
committer | Paul Gilbert | 2019-05-24 18:21:07 -0700 |
commit | 0c02346b48e068dddff81bf4fde57040135deb51 (patch) | |
tree | 51f1b0809f3379c345e8834eef0c004b4e62c2b2 /engines/glk | |
parent | 0d172c8ca695ae67b881b92add19e488c6053fbb (diff) | |
download | scummvm-rg350-0c02346b48e068dddff81bf4fde57040135deb51.tar.gz scummvm-rg350-0c02346b48e068dddff81bf4fde57040135deb51.tar.bz2 scummvm-rg350-0c02346b48e068dddff81bf4fde57040135deb51.zip |
GLK: TADS2: Fix os initialization
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 |