X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=emccpre.js;h=ebf67d1fc636204a835e08a07c3146c9cbb8d2be;hb=3234912f921916a1b8da164fd61dc75579358577;hp=5231d04e6dbd857a54b4555775b810d3f92d0234;hpb=c0fff857fd910eb4af7eabd6ad08da554f694f43;p=sgt-puzzles.git diff --git a/emccpre.js b/emccpre.js index 5231d04..ebf67d1 100644 --- a/emccpre.js +++ b/emccpre.js @@ -333,6 +333,7 @@ function initPuzzle() { resize_xbase = null; resize_ybase = null; onscreen_canvas.focus(); // return focus to the puzzle + event.preventDefault(); } else if (restore_pending) { // If you have the puzzle at larger than normal size and // then right-click to restore, I haven't found any way to @@ -345,15 +346,14 @@ function initPuzzle() { restore_puzzle_size(); onscreen_canvas.focus(); }, 20); + event.preventDefault(); } - event.preventDefault(); }); // 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