diff options
author | Relintai <relintai@gmail.com> | 2019-10-01 14:55:54 +0200 |
---|---|---|
committer | Relintai <relintai@gmail.com> | 2019-10-01 15:41:19 +0200 |
commit | 6f1d6cfc7815d753bb073e55191decb0520965f9 (patch) | |
tree | 782de545a6cfefd4967d31cc04bc8f342bcaad76 /platform | |
parent | 79298face0d7dc53b3c014ac910212a5993c1d1c (diff) |
Fixed running the export templates with newer emscripten versions.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/javascript/engine.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js index 860d6707ff..1f78aa672d 100644 --- a/platform/javascript/engine.js +++ b/platform/javascript/engine.js @@ -94,6 +94,7 @@ return new Promise(function(resolve, reject) { rtenvProps.onRuntimeInitialized = resolve; rtenvProps.onAbort = reject; + rtenvProps.thisProgram = executableName; rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps, LIBS); }); } @@ -130,13 +131,11 @@ ); }; - this.startGame = function(mainPack) { + this.startGame = function(execName, mainPack) { + + executableName = execName; + var mainArgs = [ '--main-pack', mainPack ]; - executableName = getBaseName(mainPack); - var mainArgs = []; - if (!getPathLeaf(mainPack).endsWith('.pck')) { - mainArgs = ['--main-pack', getPathLeaf(mainPack)]; - } return Promise.all([ // Load from directory, this.init(getBasePath(mainPack)), @@ -187,8 +186,6 @@ this.rtenv.locale = this.rtenv.locale.split('.')[0]; this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart; - this.rtenv.thisProgram = executableName || getBaseName(basePath); - preloadedFiles.forEach(function(file) { var dir = LIBS.PATH.dirname(file.path); try { |