diff options
| author | Ray <[email protected]> | 2021-10-10 22:38:58 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-10-10 22:38:58 +0200 |
| commit | f8719e7ec3d2b9aa5827d6523c61be598899e2b4 (patch) | |
| tree | ade7247feb992ee29f9a217be7d8d7383f77a341 /src | |
| parent | 7c36f3f6b8aac6b59bd9693f0d3e27e723ff5e3b (diff) | |
| download | raylib-f8719e7ec3d2b9aa5827d6523c61be598899e2b4.tar.gz raylib-f8719e7ec3d2b9aa5827d6523c61be598899e2b4.zip | |
Reviewed latest PR formatting
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/rcore.c b/src/rcore.c index 13540209..160e64a1 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2185,14 +2185,14 @@ void BeginScissorMode(int x, int y, int width, int height) rlEnableScissorTest(); - if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) { + if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) + { Vector2 scale = GetWindowScaleDPI(); - rlScissor( - x * scale.x, - CORE.Window.currentFbo.height - (y + height) * scale.y, - width * scale.x, - height * scale.y); - } else { + + rlScissor(x*scale.x, CORE.Window.currentFbo.height - (y + height)*scale.y, width*scale.x, height*scale.y); + } + else + { rlScissor(x, CORE.Window.currentFbo.height - (y + height), width, height); } } @@ -4919,11 +4919,15 @@ static void WindowSizeCallback(GLFWwindow *window, int width, int height) CORE.Window.screen.width = width; CORE.Window.screen.height = height; #else - if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) { + if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) + { Vector2 windowScaleDPI = GetWindowScaleDPI(); - CORE.Window.screen.width = width / windowScaleDPI.x; - CORE.Window.screen.height = height / windowScaleDPI.y; - } else { + + CORE.Window.screen.width = width/windowScaleDPI.x; + CORE.Window.screen.height = height/windowScaleDPI.y; + } + else + { CORE.Window.screen.width = width; CORE.Window.screen.height = height; } |
