[client] imgui: ensure the pointer shape is correct

Since we only update imgui's cursor location when the overlay is
enabled, if the last cursor position was showing a shape that is
incorrect when we re-enter the overlay the cursor will be wrong. This
corrects this by updating the location as we enter overlay mode.
This commit is contained in:
Geoffrey McRae 2021-08-05 06:55:41 +10:00
parent 6e7f39edee
commit 44f815409d

View File

@ -868,6 +868,8 @@ void app_setOverlay(bool enable)
wasGrabbed = g_cursor.grab;
g_state.io->ConfigFlags &= ~ImGuiConfigFlags_NoMouse;
g_state.io->MousePos = (ImVec2) { g_cursor.pos.x, g_cursor.pos.y };
core_setGrabQuiet(false);
core_setCursorInView(false);
}