ForgePatch/patches/minecraft/net/minecraft/client/MainWindow.java.patch

20 lines
1.4 KiB
Diff

--- a/net/minecraft/client/MainWindow.java
+++ b/net/minecraft/client/MainWindow.java
@@ -86,7 +86,7 @@
GLFW.glfwWindowHint(139266, 2);
GLFW.glfwWindowHint(139267, 0);
GLFW.glfwWindowHint(139272, 0);
- this.field_198119_f = GLFW.glfwCreateWindow(this.field_198129_p, this.field_198130_q, p_i51170_5_, this.field_198125_l && monitor != null ? monitor.func_197995_f() : 0L, 0L);
+ this.field_198119_f = net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.handOffWindow(()->this.field_198129_p, ()->this.field_198130_q, ()->p_i51170_5_, ()->this.field_198125_l && monitor != null ? monitor.func_197995_f() : 0L);
if (monitor != null) {
VideoMode videomode = monitor.func_197992_a(this.field_198125_l ? this.field_198124_k : Optional.empty());
this.field_198120_g = this.field_198127_n = monitor.func_197989_c() + videomode.func_198064_a() / 2 - this.field_198129_p / 2;
@@ -271,6 +271,7 @@
GLFW.glfwGetFramebufferSize(this.field_198119_f, aint, aint1);
this.field_198131_r = aint[0];
this.field_198132_s = aint1[0];
+ if (this.field_198132_s == 0 || this.field_198131_r==0) net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.updateFBSize(w->this.field_198131_r=w, h->this.field_198132_s=h);
}
private void func_198089_c(long p_198089_1_, int p_198089_3_, int p_198089_4_) {