mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 21:39:54 +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)
|
||||
{
|
||||
/* X/Y scale must be same. */
|
||||
unsigned max_scale = MIN(width / base_width,
|
||||
height / base_height);
|
||||
unsigned max_scale = MIN(
|
||||
(unsigned)roundf((float)width / base_width),
|
||||
(unsigned)roundf((height / base_height)));
|
||||
|
||||
padding_x = width - base_width * max_scale;
|
||||
padding_y = height - base_height * max_scale;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user