From 5dce742cc9593dce4c07233d15e11e1320ef6d13 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 27 Apr 2022 00:53:05 -0700 Subject: web: handle race condition on load This is incredibly unlikely to ever matter unless your browser is a potato. --- web/dartboat_wasm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'web/dartboat_wasm.c') diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c index 7c06849..c3091e9 100644 --- a/web/dartboat_wasm.c +++ b/web/dartboat_wasm.c @@ -628,9 +628,14 @@ EMSCRIPTEN_KEEPALIVE void prompt_handle(char *command, char *data) prompt_handle_undo(); } -int main() +EMSCRIPTEN_KEEPALIVE void init() { init_boat(); set_prompt_mode(PM_VISIT); handle_next(); } + +int main() +{ + EM_ASM(boatReady()); +} -- cgit v1.2.3-70-g09d2