mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-30 08:50:33 +00:00
commit
1330d5c242
@ -328,21 +328,21 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
|
||||
// Scissor
|
||||
int scissorX1 = gstate.getScissorX1();
|
||||
int scissorY1 = gstate.getScissorY1();
|
||||
int scissorX2 = gstate.getScissorX2();
|
||||
int scissorY2 = gstate.getScissorY2();
|
||||
int scissorX2 = gstate.getScissorX2() + 1;
|
||||
int scissorY2 = gstate.getScissorY2() + 1;
|
||||
|
||||
// This is a bit of a hack as the render buffer isn't always that size
|
||||
if (scissorX1 == 0 && scissorY1 == 0
|
||||
&& scissorX2 >= (int) (gstate_c.curRTWidth - 1)
|
||||
&& scissorY2 >= (int) (gstate_c.curRTHeight - 1)) {
|
||||
&& scissorX2 >= (int) gstate_c.curRTWidth
|
||||
&& scissorY2 >= (int) gstate_c.curRTHeight) {
|
||||
glstate.scissorTest.disable();
|
||||
} else {
|
||||
glstate.scissorTest.enable();
|
||||
glstate.scissorRect.set(
|
||||
renderX + scissorX1 * renderWidthFactor,
|
||||
renderY + renderHeight - (scissorY2 * renderHeightFactor),
|
||||
(scissorX2 - scissorX1 + 1) * renderWidthFactor,
|
||||
(scissorY2 - scissorY1 + 1) * renderHeightFactor);
|
||||
(scissorX2 - scissorX1) * renderWidthFactor,
|
||||
(scissorY2 - scissorY1) * renderHeightFactor);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user