Skip to content
Snippets Groups Projects
Commit febaa22a authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix non-integer scaling corruption when r2y is NULL

parent 7f1525c5
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4577 passed
......@@ -1689,6 +1689,8 @@ bitmap_get_scaled_win_size_nomax(double scale, int *w, int *h)
if (scale < 1.0)
scale = 1.0;
if (ciolib_r2yptr == NULL || ciolib_y2rptr == NULL)
scale = floor(scale);
*w = lround(vstat.scrnwidth * scale);
*h = lround(vstat.scrnheight * scale);
if (wc)
......@@ -1717,6 +1719,8 @@ bitmap_double_mult_inside(int maxwidth, int maxheight)
// TODO: Allow below 1.0?
if (mult < 1.0)
mult = 1.0;
if (ciolib_r2yptr == NULL || ciolib_y2rptr == NULL)
mult = floor(mult);
return mult;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment