@@ -1381,14 +1381,20 @@ int InitPlatform(void)
1381
1381
if ((CORE .Window .flags & FLAG_WINDOW_TRANSPARENT ) > 0 ) glfwWindowHint (GLFW_TRANSPARENT_FRAMEBUFFER , GLFW_TRUE ); // Transparent framebuffer
1382
1382
else glfwWindowHint (GLFW_TRANSPARENT_FRAMEBUFFER , GLFW_FALSE ); // Opaque framebuffer
1383
1383
1384
+ // HACK: Most of this was written before GLFW_SCALE_FRAMEBUFFER existed and
1385
+ // was enabled by default. Disabling it gets back the old behavior. A
1386
+ // complete fix will require removing a lot of CORE.Window.render
1387
+ // manipulation code.
1388
+ glfwWindowHint (GLFW_SCALE_FRAMEBUFFER , GLFW_FALSE );
1389
+
1384
1390
if ((CORE .Window .flags & FLAG_WINDOW_HIGHDPI ) > 0 )
1385
1391
{
1386
1392
// Resize window content area based on the monitor content scale.
1387
1393
// NOTE: This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11.
1388
1394
// On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
1389
1395
glfwWindowHint (GLFW_SCALE_TO_MONITOR , GLFW_TRUE ); // Scale content area based on the monitor content scale where window is placed on
1390
1396
#if defined(__APPLE__ )
1391
- glfwWindowHint (GLFW_COCOA_RETINA_FRAMEBUFFER , GLFW_TRUE );
1397
+ glfwWindowHint (GLFW_SCALE_FRAMEBUFFER , GLFW_TRUE );
1392
1398
#endif
1393
1399
}
1394
1400
else glfwWindowHint (GLFW_SCALE_TO_MONITOR , GLFW_FALSE );
@@ -1602,7 +1608,7 @@ int InitPlatform(void)
1602
1608
if ((CORE .Window .flags & FLAG_WINDOW_HIGHDPI ) > 0 )
1603
1609
{
1604
1610
// NOTE: On APPLE platforms system should manage window/input scaling and also framebuffer scaling.
1605
- // Framebuffer scaling should be activated with: glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER , GLFW_TRUE);
1611
+ // Framebuffer scaling should be activated with: glfwWindowHint(GLFW_SCALE_FRAMEBUFFER , GLFW_TRUE);
1606
1612
#if !defined(__APPLE__ )
1607
1613
glfwGetFramebufferSize (platform .handle , & fbWidth , & fbHeight );
1608
1614
0 commit comments