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 75c3793db5
commit 94116f1143
3 changed files with 3 additions and 2 deletions

View File

@ -345,7 +345,7 @@ void ImGui_ImplGlfwGL2_NewFrame()
}
// 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)