leave the cursor alone if config requests no cursor change

This commit is contained in:
SlowRiot 2026-04-02 22:54:32 +01:00
parent ed34b93d20
commit 4d012cfda2

View File

@ -422,7 +422,10 @@ void set_cursor_if_necessary(emscripten_browser_cursor_internal::cursor& current
void update_cursor(ImGui_ImplEmscripten_Data* bd)
{
// Sync any cursor changes due to ImGui to the browser's cursor
if (ImGui::GetIO().WantCaptureMouse) // mouse is hovering over the gui
ImGuiIO& io{ImGui::GetIO()};
if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange) return;
if (io.WantCaptureMouse) // mouse is hovering over the gui
{
if (bd->CursorToRestore == nullptr)
{