Files
MinecraftForge/patches/minecraft/net/minecraft/client/MainWindow.java.patch
T
embeddedt ed3ac8a122 [1.16.5] Update more parts of the toolchain (#9825)
* ForgeGradle 6, Gradle 8.4, ASM 9.6
* Apply official mappings to patches (still using MCP classnames)
* Remove reference to SpecialSource in reobfJar-like tasks
* Backport modern MDK
* Rename TransformationMatrix methods to prevent reobf, add back vanilla name via coremod
2023-12-20 10:49:06 -08:00

28 lines
1.6 KiB
Diff

--- a/net/minecraft/client/MainWindow.java
+++ b/net/minecraft/client/MainWindow.java
@@ -86,7 +_,7 @@
GLFW.glfwWindowHint(139266, 2);
GLFW.glfwWindowHint(139267, 0);
GLFW.glfwWindowHint(139272, 0);
- this.window = GLFW.glfwCreateWindow(this.width, this.height, p_i51170_5_, this.fullscreen && monitor != null ? monitor.getMonitor() : 0L, 0L);
+ this.window = net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.handOffWindow(()->this.width, ()->this.height, ()->p_i51170_5_, ()->this.fullscreen && monitor != null ? monitor.getMonitor() : 0L);
if (monitor != null) {
VideoMode videomode = monitor.getPreferredVidMode(this.fullscreen ? this.preferredFullscreenVideoMode : Optional.empty());
this.windowedX = this.x = monitor.getX() + videomode.getWidth() / 2 - this.width / 2;
@@ -136,6 +_,7 @@
public void setIcon(InputStream p_216529_1_, InputStream p_216529_2_) {
RenderSystem.assertThread(RenderSystem::isInInitPhase);
+ if (net.minecraft.client.Minecraft.ON_OSX) return;
try (MemoryStack memorystack = MemoryStack.stackPush()) {
if (p_216529_1_ == null) {
@@ -271,6 +_,7 @@
GLFW.glfwGetFramebufferSize(this.window, aint, aint1);
this.framebufferWidth = aint[0];
this.framebufferHeight = aint1[0];
+ if (this.framebufferHeight == 0 || this.framebufferWidth==0) net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.updateFBSize(w->this.framebufferWidth=w, h->this.framebufferHeight=h);
}
private void onResize(long p_198089_1_, int p_198089_3_, int p_198089_4_) {