aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/tads/tads2
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/tads/tads2')
-rw-r--r--engines/glk/tads/tads2/tads2.cpp8
1 files changed, 8 insertions, 0 deletions
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