Browse Source

fix casting warnings

Jeffery Myers 2 years ago
parent
commit
4e998bb904
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rlImGui.cpp

+ 3 - 3
rlImGui.cpp

@@ -77,7 +77,7 @@ static void rlImGuiNewFrame()
         io.DisplaySize.y = float(GetScreenHeight());
         io.DisplaySize.y = float(GetScreenHeight());
     }
     }
 
 
-    float width = io.DisplaySize.x, height = io.DisplaySize.y;
+    int width = int(io.DisplaySize.x), height = int(io.DisplaySize.y);
 #ifdef PLATFORM_DESKTOP
 #ifdef PLATFORM_DESKTOP
     glfwGetFramebufferSize(glfwGetCurrentContext(), &width, &height);
     glfwGetFramebufferSize(glfwGetCurrentContext(), &width, &height);
 #endif
 #endif
@@ -311,8 +311,8 @@ 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,
-		(GetScreenHeight() - (int)(y + height)) * io.DisplayFramebufferScale.y,
+    rlScissor((int)(x * io.DisplayFramebufferScale.x),
+		int((GetScreenHeight() - (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));
 }
 }