From b354acdfff4787f48d9bef49c4a0290bde29891a Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 5 Nov 2020 22:01:24 +0100 Subject: [PATCH] EmscriptenApplication: don't hardcode the cursor target element --- src/Magnum/Platform/EmscriptenApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Platform/EmscriptenApplication.cpp b/src/Magnum/Platform/EmscriptenApplication.cpp index 21ef96b44..9ed5c6438 100644 --- a/src/Magnum/Platform/EmscriptenApplication.cpp +++ b/src/Magnum/Platform/EmscriptenApplication.cpp @@ -662,7 +662,7 @@ void EmscriptenApplication::setCursor(Cursor cursor) { CORRADE_INTERNAL_ASSERT(UnsignedInt(cursor) < Containers::arraySize(CursorMap)); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdollar-in-identifier-extension" - EM_ASM_({document.getElementById('canvas').style.cursor = AsciiToString($0);}, CursorMap[UnsignedInt(cursor)]); + EM_ASM_({document.querySelector(UTF8ToString($0)).style.cursor = AsciiToString($1);}, _canvasTarget.c_str(), CursorMap[UnsignedInt(cursor)]); #pragma GCC diagnostic pop }