aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glulxe
diff options
context:
space:
mode:
authorPaul Gilbert2019-04-28 17:42:22 +1000
committerPaul Gilbert2019-04-28 17:42:22 +1000
commit3040135f06756de04d2b4ca2a581062baa19816b (patch)
tree92ffb2751d0b1aa7ea99e0ccf4d4d89a81328115 /engines/glk/glulxe
parentefcd8ab27047c82da67f98c4246427c8f2c19d4c (diff)
downloadscummvm-rg350-3040135f06756de04d2b4ca2a581062baa19816b.tar.gz
scummvm-rg350-3040135f06756de04d2b4ca2a581062baa19816b.tar.bz2
scummvm-rg350-3040135f06756de04d2b4ca2a581062baa19816b.zip
GLK: Record gli arrays for memory streams
Diffstat (limited to 'engines/glk/glulxe')
-rw-r--r--engines/glk/glulxe/exec.cpp2
-rw-r--r--engines/glk/glulxe/glkop.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/glk/glulxe/exec.cpp b/engines/glk/glulxe/exec.cpp
index 55cd918ebb..01faad888f 100644
--- a/engines/glk/glulxe/exec.cpp
+++ b/engines/glk/glulxe/exec.cpp
@@ -39,7 +39,7 @@ void Glulxe::execute_loop() {
gfloat32 valf, valf1, valf2;
#endif /* FLOAT_SUPPORT */
- while (!done_executing) {
+ while (!done_executing && !g_vm->shouldQuit()) {
profile_tick();
debugger_tick();
diff --git a/engines/glk/glulxe/glkop.cpp b/engines/glk/glulxe/glkop.cpp
index 68e60c7bec..635d90bb7b 100644
--- a/engines/glk/glulxe/glkop.cpp
+++ b/engines/glk/glulxe/glkop.cpp
@@ -1165,6 +1165,10 @@ void Glulxe::glulxe_retained_unregister(void *array, uint len, const char *type
uint ix, addr2, val;
uint elemsize = 0;
+ // TODO: See if original GLULXE has code I'm overlooking to cleanly close everything before freeing memmap
+ if (!memmap)
+ return;
+
if (typecode[4] == 'C')
elemsize = 1;
else if (typecode[4] == 'I')