Fix scissor on macos
This commit is contained in:
parent
3dca86ea55
commit
021985909b
|
|
@ -2184,6 +2184,14 @@ void BeginScissorMode(int x, int y, int width, int height)
|
|||
|
||||
rlEnableScissorTest();
|
||||
|
||||
#if defined(__APPLE__)
|
||||
Vector2 scale = GetWindowScaleDPI();
|
||||
rlScissor(
|
||||
(int)(x*scale.x),
|
||||
(int)(GetScreenHeight() * scale.y - (((y + height) * scale.y))),
|
||||
(int)(width*scale.x),
|
||||
(int)(height*scale.y));
|
||||
#elif
|
||||
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0)
|
||||
{
|
||||
Vector2 scale = GetWindowScaleDPI();
|
||||
|
|
@ -2194,6 +2202,7 @@ void BeginScissorMode(int x, int y, int width, int height)
|
|||
{
|
||||
rlScissor(x, CORE.Window.currentFbo.height - (y + height), width, height);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// End scissor mode
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user