aboutsummaryrefslogtreecommitdiff
path: root/emcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'emcc.c')
-rw-r--r--emcc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/emcc.c b/emcc.c
index 4591ccb..605938b 100644
--- a/emcc.c
+++ b/emcc.c
@@ -195,8 +195,8 @@ static void resize(void)
canvas_h = h;
}
-/* Called from JS when the user uses the resize handle */
-void resize_puzzle(int w, int h)
+/* Called from JS when the device pixel ratio changes */
+void rescale_puzzle(int w, int h)
{
midend_size(me, &w, &h, true);
if (canvas_w != w || canvas_h != h) {
@@ -207,6 +207,13 @@ void resize_puzzle(int w, int h)
}
}
+/* Called from JS when the user uses the resize handle */
+void resize_puzzle(int w, int h)
+{
+ rescale_puzzle(w, h);
+ js_canvas_set_nominal_size();
+}
+
/* Called from JS when the user uses the restore button */
void restore_puzzle_size(int w, int h)
{