aboutsummaryrefslogtreecommitdiff
path: root/emccpre.js
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2014-04-20 08:47:27 +0000
committerSimon Tatham <anakin@pobox.com>2014-04-20 08:47:27 +0000
commita7ddd6337517864d8ae44a20b8225046b6d6fdf3 (patch)
treecf26436455cec36fb10ed3dcbb3af0aa71ea9c9c /emccpre.js
parent5e637af2433cf64ccf6c69958e808bbd8e9f2d10 (diff)
downloadpuzzles-a7ddd6337517864d8ae44a20b8225046b6d6fdf3.zip
puzzles-a7ddd6337517864d8ae44a20b8225046b6d6fdf3.tar.gz
puzzles-a7ddd6337517864d8ae44a20b8225046b6d6fdf3.tar.bz2
puzzles-a7ddd6337517864d8ae44a20b8225046b6d6fdf3.tar.xz
Change our method of calling main() in emccpre.js.
I've just upgraded to emcc 1.16.0, in which something fiddly has happened to the semantics of Module.run() vs noInitialRun - now setting the latter seems to cause the former to do everything except calling main(), and then refuse to ever do anything again. So now I have to use Module.callMain() in place of Module.run() when I finally do get round to wanting to call main(). [originally from svn r10180]
Diffstat (limited to 'emccpre.js')
-rw-r--r--emccpre.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/emccpre.js b/emccpre.js
index 5231d04..fef83c1 100644
--- a/emccpre.js
+++ b/emccpre.js
@@ -352,8 +352,7 @@ function initPuzzle() {
// Run the C setup function, passing argv[1] as the fragment
// identifier (so that permalinks of the form puzzle.html#game-id
// can launch the specified id).
- Module.arguments = [location.hash];
- Module.run();
+ Module.callMain([location.hash]);
// And if we get here with everything having gone smoothly, i.e.
// we haven't crashed for one reason or another during setup, then