1
0
Fork 0
forked from AbleOS/ableos

Fixed scaling bug

This commit is contained in:
peony 2024-10-19 17:40:42 +02:00
parent ad351155da
commit 8d36083729

View file

@ -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