mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 17:10:12 +00:00
Make integer scale robust against rounding errors.
This commit is contained in:
parent
321ffcbca6
commit
cee493fb18
3
driver.c
3
driver.c
@ -877,7 +877,8 @@ void init_video_input(void)
|
|||||||
{
|
{
|
||||||
if (g_settings.video.force_aspect)
|
if (g_settings.video.force_aspect)
|
||||||
{
|
{
|
||||||
width = roundf(geom->base_height * g_settings.video.xscale * g_extern.system.aspect_ratio);
|
unsigned base_width = roundf(geom->base_height * g_extern.system.aspect_ratio); // Do rounding here to simplify integer scale correctness.
|
||||||
|
width = roundf(base_width * g_settings.video.xscale);
|
||||||
height = roundf(geom->base_height * g_settings.video.yscale);
|
height = roundf(geom->base_height * g_settings.video.yscale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user