Clarify logic in UpdateLogicalPresentation()
This commit is contained in:
parent
8aa5b97bb5
commit
ec685e87fd
1 changed files with 4 additions and 3 deletions
|
@ -2627,11 +2627,12 @@ static void UpdateLogicalPresentation(SDL_Renderer *renderer)
|
||||||
const float logical_h = view->logical_h;
|
const float logical_h = view->logical_h;
|
||||||
int iwidth, iheight;
|
int iwidth, iheight;
|
||||||
|
|
||||||
if (!is_main_view && renderer->target) {
|
if (is_main_view) {
|
||||||
|
SDL_GetRenderOutputSize(renderer, &iwidth, &iheight);
|
||||||
|
} else {
|
||||||
|
SDL_assert(renderer->target != NULL);
|
||||||
iwidth = (int)renderer->target->w;
|
iwidth = (int)renderer->target->w;
|
||||||
iheight = (int)renderer->target->h;
|
iheight = (int)renderer->target->h;
|
||||||
} else {
|
|
||||||
SDL_GetRenderOutputSize(renderer, &iwidth, &iheight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
view->logical_src_rect.x = 0.0f;
|
view->logical_src_rect.x = 0.0f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue