Remove unless window size tracking

The only thing we care about is the framebuffer size, cause that will differ
between game and progress gui rendering. The window size will be the same (real)
size for both.
This commit is contained in:
Jonas Herzig
2022-04-10 17:53:38 +02:00
parent fb36fc2ba8
commit 4558793030
2 changed files with 2 additions and 34 deletions

View File

@@ -527,8 +527,8 @@ public class VideoRenderer implements RenderInfo {
//#endif
//#if MC>=11400
int mouseX = (int) mc.mouse.getX() * window.getScaledWidth() / guiWindow.getDisplayWidth();
int mouseY = (int) mc.mouse.getY() * window.getScaledHeight() / guiWindow.getDisplayHeight();
int mouseX = (int) mc.mouse.getX() * window.getScaledWidth() / Math.max(window.getWidth(), 1);
int mouseY = (int) mc.mouse.getY() * window.getScaledHeight() / Math.max(window.getHeight(), 1);
if (mc.getOverlay() != null) {
Screen orgScreen = mc.currentScreen;