mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-03 16:51:27 +00:00
Fix missing regions
This commit is contained in:
@@ -21,9 +21,14 @@ void sceGuDisable(int state)
|
|||||||
case GU_SCISSOR_TEST:
|
case GU_SCISSOR_TEST:
|
||||||
{
|
{
|
||||||
GuContext *context = &gu_contexts[gu_curr_context];
|
GuContext *context = &gu_contexts[gu_curr_context];
|
||||||
|
int orig = 0;
|
||||||
|
int end = ((gu_draw_buffer.height - 1) << 10) | (gu_draw_buffer.width - 1);
|
||||||
|
|
||||||
context->scissor_enable = 0;
|
context->scissor_enable = 0;
|
||||||
sendCommandi(SCISSOR1, 0);
|
sendCommandi(SCISSOR1, orig);
|
||||||
sendCommandi(SCISSOR2, ((gu_draw_buffer.height - 1) << 10) | (gu_draw_buffer.width - 1));
|
sendCommandi(SCISSOR2, end);
|
||||||
|
sendCommandi(REGION1, orig);
|
||||||
|
sendCommandi(REGION2, end);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GU_STENCIL_TEST:
|
case GU_STENCIL_TEST:
|
||||||
|
@@ -21,9 +21,14 @@ void sceGuEnable(int state)
|
|||||||
case GU_SCISSOR_TEST:
|
case GU_SCISSOR_TEST:
|
||||||
{
|
{
|
||||||
GuContext *context = &gu_contexts[gu_curr_context];
|
GuContext *context = &gu_contexts[gu_curr_context];
|
||||||
|
int orig = (context->scissor_start[1] << 10) | context->scissor_start[0];
|
||||||
|
int end = (context->scissor_end[1] << 10) | context->scissor_end[0];
|
||||||
|
|
||||||
context->scissor_enable = 1;
|
context->scissor_enable = 1;
|
||||||
sendCommandi(SCISSOR1, (context->scissor_start[1] << 10) | context->scissor_start[0]);
|
sendCommandi(SCISSOR1, orig);
|
||||||
sendCommandi(SCISSOR2, (context->scissor_end[1] << 10) | context->scissor_end[0]);
|
sendCommandi(SCISSOR2, end);
|
||||||
|
sendCommandi(REGION1, orig);
|
||||||
|
sendCommandi(REGION2, end);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GU_STENCIL_TEST:
|
case GU_STENCIL_TEST:
|
||||||
|
@@ -19,7 +19,12 @@ void sceGuScissor(int x, int y, int w, int h)
|
|||||||
|
|
||||||
if (context->scissor_enable)
|
if (context->scissor_enable)
|
||||||
{
|
{
|
||||||
sendCommandi(SCISSOR1, (context->scissor_start[1] << 10) | context->scissor_start[0]);
|
int orig = (context->scissor_start[1] << 10) | context->scissor_start[0];
|
||||||
sendCommandi(SCISSOR2, (context->scissor_end[1] << 10) | context->scissor_end[0]);
|
int end = (context->scissor_end[1] << 10) | context->scissor_end[0];
|
||||||
|
|
||||||
|
sendCommandi(SCISSOR1, orig);
|
||||||
|
sendCommandi(SCISSOR2, end);
|
||||||
|
sendCommandi(REGION1, orig);
|
||||||
|
sendCommandi(REGION2, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user