wiiu/render: Update cliprect if viewport changes

Fixes #79
This commit is contained in:
GaryOderNichts 2024-07-06 00:59:36 +02:00
parent 7b058bd042
commit 4d3cd82e8c

View File

@ -381,6 +381,12 @@ int WIIU_SDL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, vo
if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect));
data->drawState.viewportDirty = SDL_TRUE;
if (!data->drawState.cliprectEnabled) {
/* If the clip rect is disabled, then the scissor rect should be the whole viewport */
SDL_memcpy(&data->drawState.cliprect, &data->drawState.viewport, sizeof (SDL_Rect));
data->drawState.cliprectDirty = SDL_TRUE;
}
}
break;
}