From 8d3608372916db9b57d03fe6dbe65f75c0415730 Mon Sep 17 00:00:00 2001 From: peony Date: Sat, 19 Oct 2024 17:40:42 +0200 Subject: [PATCH] Fixed scaling bug --- sysdata/libraries/render/src/software.hb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdata/libraries/render/src/software.hb b/sysdata/libraries/render/src/software.hb index 8151328..f5609c9 100644 --- a/sysdata/libraries/render/src/software.hb +++ b/sysdata/libraries/render/src/software.hb @@ -204,15 +204,16 @@ put_scaled := fn(surface: Surface, source: Surface, pos: Vec2(int), size: Vec2(i subpixel_pos.x = 0 } } - + pos.x += 1 } - if size.y < source.width { + if size.y < source.height { if source_pos.y % one_up_step.y == 0 { source_pos.y += 1 } source_pos.y += step_size.y + } else { subpixel_pos.y += 1 if subpixel_pos.y > step_size.y | source_pos.y % one_up_step.y == 0 & subpixel_pos.y >= step_size.y { source_pos.y += 1