From 3d72a5a1056ab9e27764c08fa68ac099df0a37ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 23 Apr 2024 13:15:24 -0700 Subject: [PATCH] Platform: make EmscriptenApplication work with Emscripten 3.1.54+. --- src/Magnum/Platform/EmscriptenApplication.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/EmscriptenApplication.h b/src/Magnum/Platform/EmscriptenApplication.h index 040af6b67..4b7226ba2 100644 --- a/src/Magnum/Platform/EmscriptenApplication.h +++ b/src/Magnum/Platform/EmscriptenApplication.h @@ -73,8 +73,11 @@ struct EmscriptenMouseEvent; struct EmscriptenWheelEvent; struct EmscriptenUiEvent; -/* The typedef changed in 3.1.49, https://github.com/emscripten-core/emscripten/commit/40cbc2164400a7c27218b9655f1830bfc882bb01 */ -#if __EMSCRIPTEN_major__*10000 + __EMSCRIPTEN_minor__*100 + __EMSCRIPTEN_tiny__ >= 30149 +/* The typedef changed in 3.1.49, https://github.com/emscripten-core/emscripten/commit/40cbc2164400a7c27218b9655f1830bfc882bb01, + and then again in 3.1.54, https://github.com/emscripten-core/emscripten/commit/38f9ad86a18ccc3aad911a13ffd5b89d3df304ae */ +#if __EMSCRIPTEN_major__*10000 + __EMSCRIPTEN_minor__*100 + __EMSCRIPTEN_tiny__ >= 30154 +typedef std::uintptr_t EMSCRIPTEN_WEBGL_CONTEXT_HANDLE; +#elif __EMSCRIPTEN_major__*10000 + __EMSCRIPTEN_minor__*100 + __EMSCRIPTEN_tiny__ >= 30149 typedef std::intptr_t EMSCRIPTEN_WEBGL_CONTEXT_HANDLE; #else typedef int EMSCRIPTEN_WEBGL_CONTEXT_HANDLE;