diff options
| author | Leon Krause | 2018-05-10 13:43:58 +0200 |
|---|---|---|
| committer | Leon Krause | 2018-05-10 15:08:19 +0200 |
| commit | 96f907c023b687206df6233be383d724e2810088 (patch) | |
| tree | 0ed4590505d8858abff0dfc76eb3c2eb02d495c3 /platform/javascript/engine.js | |
| parent | 32eb3e1b7d2aa6010f154d8b4850357f5a11662a (diff) | |
| download | godot-96f907c023b687206df6233be383d724e2810088.tar.gz godot-96f907c023b687206df6233be383d724e2810088.tar.zst godot-96f907c023b687206df6233be383d724e2810088.zip | |
Diffstat (limited to 'platform/javascript/engine.js')
| -rw-r--r-- | platform/javascript/engine.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js index 0c1337cc3..1d78f28bb 100644 --- a/platform/javascript/engine.js +++ b/platform/javascript/engine.js @@ -130,13 +130,17 @@ this.startGame = function(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)), // ...but write to root where the engine expects it. this.preloadFile(mainPack, getPathLeaf(mainPack)) ]).then( - Function.prototype.apply.bind(synchronousStart, this, []) + Function.prototype.apply.bind(synchronousStart, this, mainArgs) ); }; |
