From 510a5d76180f30f1dd75a05927bbcb10bfae8da8 Mon Sep 17 00:00:00 2001 From: Henrique Alves Date: Thu, 2 May 2024 00:37:10 +0300 Subject: basic GoL --- sources/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sources/main.c') diff --git a/sources/main.c b/sources/main.c index b248f24..3c2e1da 100644 --- a/sources/main.c +++ b/sources/main.c @@ -21,12 +21,14 @@ s7_pointer s7_draw_fn; #ifdef __EMSCRIPTEN__ EM_BOOL main_loop_web(double time, void* userData) { + s7_call(s7, s7_update_fn, s7_list(s7, 0)); - + BeginDrawing(); ClearBackground(BLUE); s7_call(s7, s7_draw_fn, s7_list(s7, 0)); EndDrawing(); + PollInputEvents(); // <- this is necessary because of a web specific bug. See https://github.com/raysan5/raylib/issues/2379 return EM_TRUE; } #else -- cgit v1.2.3