Examples: GLFW: Don't alter cursor mode if GLFW_CURSOR input mode is GLFW_CURSOR_DISABLED. (#1202) [@PhilCK]

This commit is contained in:
omar
2018-03-20 22:41:05 +01:00
parent 42ad3c1dd3
commit 200754b013
2 changed files with 2 additions and 1 deletions

View File

@ -242,7 +242,7 @@ static void ImGui_ImplGlfw_UpdateMouse()
}
// Update OS/hardware mouse cursor if imgui isn't drawing a software cursor
if ((io.ConfigFlags & ImGuiConfigFlags_NoSetMouseCursor) == 0)
if ((io.ConfigFlags & ImGuiConfigFlags_NoSetMouseCursor) == 0 && glfwGetInputMode(g_Window, GLFW_CURSOR) != GLFW_CURSOR_DISABLED)
{
ImGuiMouseCursor cursor = ImGui::GetMouseCursor();
if (io.MouseDrawCursor || cursor == ImGuiMouseCursor_None)