mirror of https://github.com/encounter/SDL.git
Fixed compile warnings about type conversion.
Found by buildbot.
This commit is contained in:
parent
2191abb2c9
commit
0a1999dfd2
|
@ -1156,9 +1156,9 @@ UpdateLogicalSize(SDL_Renderer *renderer)
|
||||||
|
|
||||||
if (renderer->integer_scale) {
|
if (renderer->integer_scale) {
|
||||||
if (want_aspect > real_aspect) {
|
if (want_aspect > real_aspect) {
|
||||||
scale = w / renderer->logical_w;
|
scale = (float)(w / renderer->logical_w);
|
||||||
} else {
|
} else {
|
||||||
scale = h / renderer->logical_h;
|
scale = (float)(h / renderer->logical_h);
|
||||||
}
|
}
|
||||||
viewport.w = (int)SDL_ceil(renderer->logical_w * scale);
|
viewport.w = (int)SDL_ceil(renderer->logical_w * scale);
|
||||||
viewport.x = (w - viewport.w) / 2;
|
viewport.x = (w - viewport.w) / 2;
|
||||||
|
|
Loading…
Reference in New Issue