From 0c02346b48e068dddff81bf4fde57040135deb51 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 18 May 2019 17:14:12 -1000 Subject: GLK: TADS2: Fix os initialization --- engines/glk/tads/tads2/tads2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/glk/tads/tads2') 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 -- cgit v1.2.3