From 352fa9a1784ae603dc766b31b9b67ebaa3ec0fc0 Mon Sep 17 00:00:00 2001 From: tovjemam Date: Sun, 21 Jun 2026 17:44:50 +0200 Subject: [PATCH] Remove the emscripten async update timer stuff as its broken af --- src/client/main.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/client/main.cpp b/src/client/main.cpp index b361582..f2bdf46 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -413,23 +413,23 @@ static void Frame() SDL_GL_SwapWindow(s_window); } -#ifdef EMSCRIPTEN +// #ifdef EMSCRIPTEN -static void Update(void* args) -{ +// static void Update(void* args) +// { - // std::cout << "update called" << std::endl; - if (can_update && (SDL_GetTicks() - last_update >= 100)) - { - // std::cout << "calling Frame()" << std::endl; - Frame(); - } +// // std::cout << "update called" << std::endl; +// if (can_update && (SDL_GetTicks() - last_update >= 100)) +// { +// // std::cout << "calling Frame()" << std::endl; +// Frame(); +// } - emscripten_async_call(Update, nullptr, 100); - // std::cout << "update finished" << std::endl; -} +// emscripten_async_call(Update, nullptr, 100); +// // std::cout << "update finished" << std::endl; +// } -#endif +// #endif static void Main() { if (s_url.empty()) @@ -460,7 +460,7 @@ static void Main() { #ifdef EMSCRIPTEN emscripten_set_main_loop(Frame, 0, false); - Update(nullptr); + // Update(nullptr); #else #ifdef _WIN32