mirror of
https://github.com/libretro/RetroArch
synced 2025-02-08 06:40:14 +00:00
Integer scale fix for windowed mode
This commit is contained in:
parent
643b3a73a4
commit
4ec9fe5a57
@ -21388,8 +21388,10 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
|||||||
if (keep_aspect)
|
if (keep_aspect)
|
||||||
{
|
{
|
||||||
/* X/Y scale must be same. */
|
/* X/Y scale must be same. */
|
||||||
unsigned max_scale = MIN(width / base_width,
|
unsigned max_scale = MIN(
|
||||||
height / base_height);
|
(unsigned)roundf((float)width / base_width),
|
||||||
|
(unsigned)roundf((height / base_height)));
|
||||||
|
|
||||||
padding_x = width - base_width * max_scale;
|
padding_x = width - base_width * max_scale;
|
||||||
padding_y = height - base_height * max_scale;
|
padding_y = height - base_height * max_scale;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user