浏览代码

use the correct window size for scissor mode inverts.

Jeff Myers 1 年之前
父节点
当前提交
a7ea68023c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rlImGui.cpp

+ 1 - 1
rlImGui.cpp

@@ -254,7 +254,7 @@ static void EnableScissor(float x, float y, float width, float height)
     rlEnableScissorTest();
     rlEnableScissorTest();
     ImGuiIO& io = ImGui::GetIO();
     ImGuiIO& io = ImGui::GetIO();
     rlScissor((int)(x * io.DisplayFramebufferScale.x),
     rlScissor((int)(x * io.DisplayFramebufferScale.x),
-        int((GetScreenHeight() - (int)(y + height)) * io.DisplayFramebufferScale.y),
+        int((io.DisplaySize.y - (int)(y + height)) * io.DisplayFramebufferScale.y),
         (int)(width * io.DisplayFramebufferScale.x),
         (int)(width * io.DisplayFramebufferScale.x),
         (int)(height * io.DisplayFramebufferScale.y));
         (int)(height * io.DisplayFramebufferScale.y));
 }
 }