Lagrange [work/v1.8]

Media: Fixed image resizing when there is no maximum texture size

=> 52fb73468da7c419d6959b6d5b6a21572cf8e275

diff --git a/src/media.c b/src/media.c
index 28148ad7..c3b38ae3 100644
--- a/src/media.c
+++ b/src/media.c
@@ -98,7 +98,8 @@ void makeTexture_GmImage(iGmImage *d) {
         /* Resize down to min(maximum texture size, window size). */ {
             SDL_Rect dispRect;
             SDL_GetDisplayBounds(SDL_GetWindowDisplayIndex(window->win), &dispRect);
-            const iInt2 maxSize = min_I2(maxTextureSize_Window(window),
+            const iInt2 maxSize = min_I2(isEqual_I2(maxTextureSize_Window(window), zero_I2()) ?
+                                         texSize : maxTextureSize_Window(window),
                                          coord_Window(window, dispRect.w, dispRect.h));
             iInt2 scaled = d->size;
             if (scaled.x > maxSize.x) {
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.8/cdiff/52fb73468da7c419d6959b6d5b6a21572cf8e275
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
119.534576 milliseconds
Gemini-to-HTML Time
0.196788 milliseconds

This content has been proxied by September (ba2dc).