From b0e6dd78b2b15277bec9b86cf2af78657f125918 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Mon, 7 Oct 2024 20:29:03 +0300 Subject: [PATCH] fix ratio --- src/rendering/twn_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rendering/twn_draw.c b/src/rendering/twn_draw.c index 648b4c6..fec1f90 100644 --- a/src/rendering/twn_draw.c +++ b/src/rendering/twn_draw.c @@ -251,7 +251,7 @@ void render(void) { /* fit rendering context onto the resizable screen */ if (ctx.game.window_size_has_changed) { - if ((float)ctx.game.window_w / (float)ctx.game.window_h > (float)(ctx.base_render_width / ctx.base_render_height)) { + if ((float)ctx.game.window_w / (float)ctx.game.window_h > (float)ctx.base_render_width / (float)ctx.base_render_height) { float ratio = (float)ctx.game.window_h / (float)ctx.base_render_height; int w = (int)((float)ctx.base_render_width * ratio); setup_viewport(