Skip to content

Vita: Fixed absence of clipping when viewport is set #13194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: SDL2
Choose a base branch
from

Conversation

Wohlstand
Copy link
Contributor

Resolves a problem of viewport on the Vita set by SDL_RenderSetViewport() that doesn't sets any clipping by default.

How it looked before the fix:
изображение

How it supposed to look everywhere (after fix):
изображение

Description

This solution sets the cliprect in shadow when real cliprect is unused. And when cliprect gets reset, the viewport's rect gets set when viewport is set (the width and height gets compared to the size of the drawable area such as screen or texture).

Existing Issue(s)

#13034

@Wohlstand Wohlstand force-pushed the fix-vita-viewport branch from 43b4d75 to c433cbf Compare June 8, 2025 22:44
@ds-sloth
Copy link
Contributor

ds-sloth commented Jun 9, 2025

This fix is much better than the existing behavior, but I think it might not handle the case where a manually-specified clip rect is larger than the viewport.

@Wohlstand
Copy link
Contributor Author

This fix is much better than the existing behavior, but I think it might not handle the case where a manually-specified clip rect is larger than the viewport.

A good case, then it's need to cut down the clip rect when viewport is set, and rectangle is out of viewport's range.

Don't allow cliprect be larger than viewport's scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants