Make integer scale robust against rounding errors.

This commit is contained in:
Themaister 2013-06-05 21:48:52 +02:00
parent 321ffcbca6
commit cee493fb18

View File

@ -877,7 +877,8 @@ void init_video_input(void)
{
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);
}
else