aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/tads/tads2
diff options
context:
space:
mode:
authorPaul Gilbert2019-05-18 17:14:12 -1000
committerPaul Gilbert2019-05-24 18:21:07 -0700
commit0c02346b48e068dddff81bf4fde57040135deb51 (patch)
tree51f1b0809f3379c345e8834eef0c004b4e62c2b2 /engines/glk/tads/tads2
parent0d172c8ca695ae67b881b92add19e488c6053fbb (diff)
downloadscummvm-rg350-0c02346b48e068dddff81bf4fde57040135deb51.tar.gz
scummvm-rg350-0c02346b48e068dddff81bf4fde57040135deb51.tar.bz2
scummvm-rg350-0c02346b48e068dddff81bf4fde57040135deb51.zip
GLK: TADS2: Fix os initialization
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