Skip to content

Commit

Permalink
REVIEWED: BeginScissorMode() #3510
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Nov 9, 2023
1 parent c471d22 commit 80aafdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,13 +1093,13 @@ void BeginScissorMode(int x, int y, int width, int height)
rlEnableScissorTest();

#if defined(__APPLE__)
if (CORE.Window.usingFbo)
if (!CORE.Window.usingFbo)
{
Vector2 scale = GetWindowScaleDPI();
rlScissor((int)(x*scale.x), (int)(GetScreenHeight()*scale.y - (((y + height)*scale.y))), (int)(width*scale.x), (int)(height*scale.y));
}
#else
if (CORE.Window.usingFbo && ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0))
if (!CORE.Window.usingFbo && ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0))
{
Vector2 scale = GetWindowScaleDPI();
rlScissor((int)(x*scale.x), (int)(CORE.Window.currentFbo.height - (y + height)*scale.y), (int)(width*scale.x), (int)(height*scale.y));
Expand Down

0 comments on commit 80aafdb

Please sign in to comment.