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

"Fix" a couple impossible ways for vstat.scaling to be zero.

Seriously, that's not possible.
parent dabd649e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4236 passed
......@@ -1663,6 +1663,8 @@ bitmap_largest_mult_inside(int maxwidth, int maxheight)
mult = maxwidth / vstat.scrnwidth;
else
mult = maxheight / vstat.scrnheight;
if (mult < 1)
mult = 1;
for (;mult > 1; mult--) {
bitmap_get_scaled_win_size(mult, &w, &h, 0, 0);
if (w <= maxwidth && h <= maxheight)
......
......@@ -542,7 +542,7 @@ static int video_init()
lot easier. */
pthread_mutex_lock(&vstatlock);
if (x_cvstat.scaling < 1)
if (x_cvstat.scaling < 1 || vstat.scaling < 1)
x_cvstat.scaling = vstat.scaling = 1;
if (ciolib_initial_scaling)
x_cvstat.scaling = vstat.scaling = ciolib_initial_scaling;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment