Browse Source

use rlImgui to get the frame buffer size so we can hot reload.

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

+ 2 - 4
rlImGui.cpp

@@ -89,10 +89,8 @@ static void rlImGuiNewFrame()
 		io.DisplaySize.y = float(GetScreenHeight());
 		io.DisplaySize.y = float(GetScreenHeight());
 	}
 	}
 
 
-	int width = int(io.DisplaySize.x), height = int(io.DisplaySize.y);
-#ifdef PLATFORM_DESKTOP
-	glfwGetFramebufferSize(glfwGetCurrentContext(), &width, &height);
-#endif
+	int width = rlGetFramebufferWidth();
+	int height = rlGetFramebufferHeight();
 	if (width > 0 && height > 0) {
 	if (width > 0 && height > 0) {
 		io.DisplayFramebufferScale = ImVec2(width / io.DisplaySize.x, height / io.DisplaySize.y);
 		io.DisplayFramebufferScale = ImVec2(width / io.DisplaySize.x, height / io.DisplaySize.y);
 	}
 	}