@@ -482,8 +482,8 @@ private void updateSizes() {
482482 // framebuffer size (resolution) may differ from window size (e.g. HiDPI)
483483
484484 glfwGetWindowSize (window , width , height );
485- int windowWidth = width [0 ] < 1 ? 1 : width [0 ];
486- int windowHeight = height [0 ] < 1 ? 1 : height [0 ];
485+ int windowWidth = width [0 ] < 16 ? 16 : width [0 ];
486+ int windowHeight = height [0 ] < 16 ? 16 : height [0 ];
487487 if (settings .getWindowWidth () != windowWidth || settings .getWindowHeight () != windowHeight ) {
488488 settings .setWindowSize (windowWidth , windowHeight );
489489 for (WindowSizeListener wsListener : windowSizeListeners .getArray ()) {
@@ -492,8 +492,8 @@ private void updateSizes() {
492492 }
493493
494494 glfwGetFramebufferSize (window , width , height );
495- int framebufferWidth = width [0 ];
496- int framebufferHeight = height [0 ];
495+ int framebufferWidth = width [0 ] < 16 ? 16 : width [ 0 ] ;
496+ int framebufferHeight = height [0 ] < 16 ? 16 : height [ 0 ] ;
497497 if (framebufferWidth != oldFramebufferWidth || framebufferHeight != oldFramebufferHeight ) {
498498 settings .setResolution (framebufferWidth , framebufferHeight );
499499 listener .reshape (framebufferWidth , framebufferHeight );
@@ -502,8 +502,8 @@ private void updateSizes() {
502502 oldFramebufferHeight = framebufferHeight ;
503503 }
504504
505- float xScale = framebufferWidth / windowWidth ;
506- float yScale = framebufferHeight / windowHeight ;
505+ float xScale = ( float ) framebufferWidth / windowWidth ;
506+ float yScale = ( float ) framebufferHeight / windowHeight ;
507507 if (oldScale .x != xScale || oldScale .y != yScale ) {
508508 listener .rescale (xScale , yScale );
509509
0 commit comments