From f37e55a77bd6177dbaea4d7f484961c09104e104 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 25 Apr 2019 13:45:37 +0200 Subject: [PATCH] Reverted HiDPI changes, they break 2D mode on HiDPI :( --- src/core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core.c b/src/core.c index 8034b029..0d17fdad 100644 --- a/src/core.c +++ b/src/core.c @@ -1084,7 +1084,7 @@ void BeginDrawing(void) previousTime = currentTime; rlLoadIdentity(); // Reset current matrix (MODELVIEW) - rlMultMatrixf(MatrixToFloat(screenScaling)); // If downscale required, apply it here + rlMultMatrixf(MatrixToFloat(screenScaling)); // Apply screen scaling //rlTranslatef(0.375, 0.375, 0); // HACK to have 2D pixel-perfect drawing on OpenGL 1.1 // NOTE: Not required with OpenGL 3.3+ @@ -2465,7 +2465,7 @@ static bool InitGraphicsDevice(int width, int height) float scaleRatio = 0.0f; glfwGetWindowContentScale(window, &scaleRatio, NULL); scaleRatio = roundf(scaleRatio); - screenScaling = MatrixScale(scaleRatio, scaleRatio, scaleRatio); + //screenScaling = MatrixScale(scaleRatio, scaleRatio, scaleRatio); #endif renderWidth = screenWidth; renderHeight = screenHeight; @@ -2882,10 +2882,9 @@ static bool InitGraphicsDevice(int width, int height) // Set viewport parameters static void SetupViewport(void) { -#if defined(PLATFORM_DESKTOP) +#if defined(__APPLE__) // Get framebuffer size of current window - // NOTE: Required to handle HighDPI display correctly on OSX because framebuffer - // is automatically reasized to adapt to new DPI. + // NOTE: Required to handle HighDPI display correctly on OSX because framebuffer is automatically reasized to adapt to new DPI. // When OS does that, it can be detected using GLFW3 callback: glfwSetFramebufferSizeCallback() int fbWidth, fbHeight; glfwGetFramebufferSize(window, &fbWidth, &fbHeight);