From: Stephen Seo Date: Thu, 21 Mar 2024 07:56:49 +0000 (+0900) Subject: Attempt to fix wrong canvas size X-Git-Url: https://git.seodisparate.com/stephenseo/static/gitweb.js?a=commitdiff_plain;h=d49941096ae046f9be7f81601279c557a127d1c5;p=jumpartifact.com_demo_0 Attempt to fix wrong canvas size After bumping emsdk version, the canvas loads with an invalid size. This commit attempts to fix this. --- diff --git a/src/main.cc b/src/main.cc index e2ef556..5dfb1e5 100644 --- a/src/main.cc +++ b/src/main.cc @@ -57,7 +57,11 @@ void jumpartifact_demo_update(void *ud) { } int main() { +#ifdef __EMSCRIPTEN__ + InitWindow(call_js_get_canvas_width(), call_js_get_canvas_height(), "Demo"); +#else InitWindow(800, 800, "Demo"); +#endif #ifdef NDEBUG SetTraceLogLevel(LOG_WARNING);