diff --git a/package.json b/package.json index 482f6d7..1f9eb57 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ifvms", "title": "ifvms.js", - "version": "1.1.4", + "version": "1.1.5", "description": "The Interactive Fiction Virtual Machines Suite - in Javascript", "author": "Dannii Willis ", "license": "MIT", diff --git a/src/zvm/io.js b/src/zvm/io.js index 597a197..5be99f1 100644 --- a/src/zvm/io.js +++ b/src/zvm/io.js @@ -399,7 +399,7 @@ module.exports = { if (this.version3) { this.statuswin = Glk.glk_window_open(this.mainwin, 0x12, 1, 4, 202) - if (this.statuswin) + if (this.statuswin && this.Glk.glk_gestalt(0x1100, 0)) { Glk.garglk_set_reversevideo_stream(Glk.glk_window_get_stream(this.statuswin), 1) } @@ -409,7 +409,10 @@ module.exports = { { // Clean up after restarting Glk.glk_stylehint_clear(0, 0, 8) - Glk.garglk_set_zcolors_stream(this.mainwin.str, this.io.fg, this.io.bg) + if (this.Glk.glk_gestalt(0x1100, 0)) + { + Glk.garglk_set_zcolors_stream(this.mainwin.str, this.io.fg, this.io.bg) + } Glk.glk_window_clear(this.mainwin) if (this.upperwin) { @@ -1004,7 +1007,10 @@ module.exports = { Glk.glk_stylehint_set(4, 0, 8, this.io.bg) } this.upperwin = Glk.glk_window_open( this.mainwin, 0x12, io.maxheight, 4, 203 ); - Glk.garglk_set_zcolors_stream(this.upperwin.str, this.io.fg, this.io.bg) + if (this.Glk.glk_gestalt(0x1100, 0)) + { + Glk.garglk_set_zcolors_stream(this.upperwin.str, this.io.fg, this.io.bg) + } Glk.glk_stylehint_clear(4, 0, 8) } else