diff options
| author | Ray <[email protected]> | 2019-04-25 13:45:37 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-04-25 13:45:37 +0200 |
| commit | f37e55a77bd6177dbaea4d7f484961c09104e104 (patch) | |
| tree | 6fb8bb6c200a8b3ad8040c4921591d96040a3aed | |
| parent | c76863b289fdd7d41bd074c11e9660851818caad (diff) | |
| download | raylib-f37e55a77bd6177dbaea4d7f484961c09104e104.tar.gz raylib-f37e55a77bd6177dbaea4d7f484961c09104e104.zip | |
Reverted HiDPI changes, they break 2D mode on HiDPI :(
| -rw-r--r-- | src/core.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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); |
