Reviewed latest PR formatting
This commit is contained in:
parent
7c36f3f6b8
commit
f8719e7ec3
1 changed files with 15 additions and 11 deletions
22
src/rcore.c
22
src/rcore.c
|
@ -2185,14 +2185,14 @@ void BeginScissorMode(int x, int y, int width, int height)
|
||||||
|
|
||||||
rlEnableScissorTest();
|
rlEnableScissorTest();
|
||||||
|
|
||||||
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) {
|
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0)
|
||||||
|
{
|
||||||
Vector2 scale = GetWindowScaleDPI();
|
Vector2 scale = GetWindowScaleDPI();
|
||||||
rlScissor(
|
|
||||||
x * scale.x,
|
rlScissor(x*scale.x, CORE.Window.currentFbo.height - (y + height)*scale.y, width*scale.x, height*scale.y);
|
||||||
CORE.Window.currentFbo.height - (y + height) * scale.y,
|
}
|
||||||
width * scale.x,
|
else
|
||||||
height * scale.y);
|
{
|
||||||
} else {
|
|
||||||
rlScissor(x, CORE.Window.currentFbo.height - (y + height), width, height);
|
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.width = width;
|
||||||
CORE.Window.screen.height = height;
|
CORE.Window.screen.height = height;
|
||||||
#else
|
#else
|
||||||
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) {
|
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0)
|
||||||
|
{
|
||||||
Vector2 windowScaleDPI = GetWindowScaleDPI();
|
Vector2 windowScaleDPI = GetWindowScaleDPI();
|
||||||
|
|
||||||
CORE.Window.screen.width = width/windowScaleDPI.x;
|
CORE.Window.screen.width = width/windowScaleDPI.x;
|
||||||
CORE.Window.screen.height = height/windowScaleDPI.y;
|
CORE.Window.screen.height = height/windowScaleDPI.y;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
CORE.Window.screen.width = width;
|
CORE.Window.screen.width = width;
|
||||||
CORE.Window.screen.height = height;
|
CORE.Window.screen.height = height;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue