Call Minecraft#updateDisplay in VideoRenderer if not in High Performance Mode, to resize the GuiVideoRenderer if user resized screen (requested by many users)

This has no side effects on the rendered video.
Change GuiVideoRenderer#initGui method to allow for resizing
This commit is contained in:
CrushedPixel
2015-07-30 12:59:54 +02:00
parent 7e99cfeb50
commit 34fe741cc4
2 changed files with 38 additions and 9 deletions

View File

@@ -365,6 +365,12 @@ public class VideoRenderer implements RenderInfo {
throw new RuntimeException(e);
}
//if not in high performance mode, update the gui size if screen size changed
//this takes virtually no time
if(!options.isHighPerformance()) {
mc.updateDisplay();
}
ScaledResolution scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
int mouseX = Mouse.getX() * scaled.getScaledWidth() / mc.displayWidth;
int mouseY = scaled.getScaledHeight() - Mouse.getY() * scaled.getScaledHeight() / mc.displayHeight - 1;