From 405b9879867ba2083721137d14f01b0ae03a90e9 Mon Sep 17 00:00:00 2001 From: valadaa48 Date: Thu, 3 Sep 2020 21:53:21 -0400 Subject: [PATCH] oga_gfx: round width to nearest integer when scaling --- gfx/drivers/oga_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/oga_gfx.c b/gfx/drivers/oga_gfx.c index 2e69f19c56..920626db3a 100644 --- a/gfx/drivers/oga_gfx.c +++ b/gfx/drivers/oga_gfx.c @@ -297,7 +297,7 @@ static bool oga_gfx_frame(void *data, const void *frame, unsigned width, if ((out_w != width || out_h != height)) { - out_w = MIN(out_h * video_driver_get_aspect_ratio(), NATIVE_WIDTH); + out_w = MIN(out_h * video_driver_get_aspect_ratio() + 0.5, NATIVE_WIDTH); out_x = MAX((NATIVE_WIDTH - out_w) / 2, 0); }