Fix resizing in render progress gui being at totally the wrong position causing the rendered video to be swapped to screen

This commit is contained in:
johni0702
2015-08-10 14:41:56 +02:00
parent 4aa1ee847f
commit 7e91cb82a6

View File

@@ -365,12 +365,6 @@ 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;
@@ -382,7 +376,14 @@ public class VideoRenderer implements RenderInfo {
mc.getFramebuffer().framebufferRender(mc.displayWidth, mc.displayHeight);
popMatrix();
Display.update();
// if not in high performance mode, update the gui size if screen size changed
// otherwise just swap the progress gui to screen
if (options.isHighPerformance()) {
Display.update();
} else {
mc.updateDisplay();
}
if (Mouse.isGrabbed()) {
Mouse.setGrabbed(false);
}