mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-29 17:15:40 +00:00
fix scissor code for native resolution (thanks HarryTuttle)
This commit is contained in:
parent
519cce34f5
commit
9fb6acc92d
|
@ -141,15 +141,12 @@ static bool SetGLGeometry(unsigned *xOffsetPtr, unsigned *yOffsetPtr, unsigned *
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
// Scissor box (to clip visible area)
|
// Scissor box (to clip visible area)
|
||||||
if (!g_Config.wideScreen)
|
if (g_Config.wideScreen)
|
||||||
{
|
{
|
||||||
if (VideoInfo->current_w > int(*xResPtr) || VideoInfo->current_h > int(*yResPtr))
|
glScissor(0, correction, *totalXResPtr, *totalYResPtr - (correction * 2));
|
||||||
{
|
|
||||||
glScissor(*xOffsetPtr + correction, *yOffsetPtr + correction, *xResPtr - (correction*2), *yResPtr - (correction*2));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
glScissor(0, correction, *totalXResPtr, *totalYResPtr - (correction * 2));
|
glScissor(*xOffsetPtr + correction, *yOffsetPtr + correction, *xResPtr - (correction * 2), *yResPtr - (correction * 2));
|
||||||
}
|
}
|
||||||
return OKAY;
|
return OKAY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue