Mercurial > repos > blastem
diff nuklear_ui/nuklear.h @ 2261:86dfcf3f418a
Fix crash at very low resolutions
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 23 Dec 2022 05:49:04 -0800 |
parents | 579fe3f6fe76 |
children | 596786e43c24 |
line wrap: on
line diff
--- a/nuklear_ui/nuklear.h Sun Dec 18 23:32:33 2022 -0800 +++ b/nuklear_ui/nuklear.h Fri Dec 23 05:49:04 2022 -0800 @@ -11387,7 +11387,7 @@ *height = 0; int width_estimate = sqrt(pixel_area_estimate) + 0.5; *width = 128; - while (*width < width_estimate) + while (*width < width_estimate || *width < custom->w * 2) { *width *= 2; }