X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=cd28493f1ece06a549ee4517e1f369d14bd00571;hb=38ea4e57bc9b730abf7a15f8cc235465e6f0ad4c;hp=0d19ff9c16eadf9844d3ada6371c35e685cb3748;hpb=22f539028eb272b70d339e1f37552a2a89f37dd6;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 0d19ff9c..cd28493f 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1932,14 +1932,14 @@ void get_aspect_ratio_from_screen_mode(struct ScreenModeInfo *screen_mode, do { - *x = i * aspect_ratio; + *x = i * aspect_ratio + 0.000001; *y = i; aspect_ratio_new = (float)*x / (float)*y; i++; } - while (aspect_ratio_new != aspect_ratio && *x < screen_mode->width); + while (aspect_ratio_new != aspect_ratio && *y < screen_mode->height); } static void FreeCustomArtworkList(struct ArtworkListInfo *,