Skip to content

Commit

Permalink
Align resize behavior to lwjgl2 (#163)
Browse files Browse the repository at this point in the history
* Align resize behavior to lwjgl2

* "update" fg
  • Loading branch information
vfyjxf authored Jun 15, 2024
1 parent 7ff6718 commit e2bb54d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:6.10.+"
classpath "net.minecraftforge.gradle:ForgeGradle:6.0.+"
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/lwjgl/opengl/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public class Display {
*
* @param pixel_format Describes the minimum specifications the context must fulfill.
* @param shared_drawable The Drawable to share context with. (optional, may be null)
*
* @throws org.lwjgl.LWJGLException
*/
public static void create(PixelFormat pixel_format, Drawable shared_drawable) {
Expand Down Expand Up @@ -125,7 +124,7 @@ public static void create() {
glfwWindowHintString(GLFW_COCOA_FRAME_NAME, ForgeEarlyConfig.COCOA_FRAME_NAME);

glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE); // request a non-hidpi framebuffer on Retina displays
// on MacOS
// on MacOS

Window.handle = glfwCreateWindow(mode.getWidth(), mode.getHeight(), windowTitle, NULL, NULL);
if (Window.handle == 0L) {
Expand Down Expand Up @@ -242,7 +241,8 @@ public void invoke(long window, boolean iconified) {
@Override
public void invoke(long window, int width, int height) {

latestResized = true;
boolean minimized = width == 0 && height == 0;
latestResized = true && !minimized;
latestWidth = width;
latestHeight = height;
}
Expand Down

0 comments on commit e2bb54d

Please sign in to comment.