Fix Render discard issue [pd-3ds]

- Clip Rects do now not discard when they move out of screen (cause the maths ends in < 0 which is not working with u32)
- Fixing ui7 crash wehn im input was nullptr
This commit is contained in:
2026-03-10 18:57:29 +01:00
parent 97efca5173
commit 02d2200edd
6 changed files with 15 additions and 11 deletions

View File

@@ -180,8 +180,10 @@ void GfxC3D::RenderDrawData(const PD::Li::CmdPool& Commands) {
if (ScissorEnabled) {
// Figure out this setup was pain
C3D_SetScissor(GPU_SCISSOR_NORMAL,
ViewPort.y - (ScissorRect.y + ScissorRect.w),
ViewPort.x - (ScissorRect.x + ScissorRect.z),
std::clamp(ViewPort.y - (ScissorRect.y + ScissorRect.w), 0,
ViewPort.y),
std::clamp(ViewPort.x - (ScissorRect.x + ScissorRect.z), 0,
ViewPort.x),
ViewPort.y - ScissorRect.y, ViewPort.x - ScissorRect.x);
} else {
C3D_SetScissor(GPU_SCISSOR_DISABLE, 0, 0, 0, 0);