Browse Source

Using GetCurrentWindowRead() instead of GetCurrentWindow()

ocornut 9 năm trước cách đây
mục cha
commit
5525c2356a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      imgui.cpp

+ 2 - 2
imgui.cpp

@@ -5082,13 +5082,13 @@ ImVec2 ImGui::GetCursorPos()
 
 float ImGui::GetCursorPosX()
 {
-    ImGuiWindow* window = GetCurrentWindow();
+    ImGuiWindow* window = GetCurrentWindowRead();
     return window->DC.CursorPos.x - window->Pos.x + window->Scroll.x;
 }
 
 float ImGui::GetCursorPosY()
 {
-    ImGuiWindow* window = GetCurrentWindow();
+    ImGuiWindow* window = GetCurrentWindowRead();
     return window->DC.CursorPos.y - window->Pos.y + window->Scroll.y;
 }