Vita: fix clip rectangle

This commit is contained in:
Ivan Epifanov 2021-06-21 23:56:04 +03:00 committed by Sam Lantinga
parent e41d3e617e
commit b55ee12f69
1 changed files with 2 additions and 3 deletions

View File

@ -808,9 +808,8 @@ SetDrawState(VITA_GXM_RenderData *data, const SDL_RenderCommand *cmd, SDL_bool s
if (data->drawstate.cliprect_enabled && data->drawstate.cliprect_dirty) { if (data->drawstate.cliprect_enabled && data->drawstate.cliprect_dirty) {
const SDL_Rect *viewport = &data->drawstate.viewport; const SDL_Rect *viewport = &data->drawstate.viewport;
const SDL_Rect *rect = &data->drawstate.cliprect; const SDL_Rect *rect = &data->drawstate.cliprect;
set_clip_rectangle(data, viewport->x + rect->x, set_clip_rectangle(data, rect->x, rect->y,
data->drawstate.target ? viewport->y + rect->y : data->drawstate.drawableh - viewport->y - rect->y - rect->h, rect->x + rect->w, rect->y + rect->h);
rect->w, rect->h);
data->drawstate.cliprect_dirty = SDL_FALSE; data->drawstate.cliprect_dirty = SDL_FALSE;
} }