summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/media.c3
1 files changed, 2 insertions, 1 deletions
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) {
98 /* Resize down to min(maximum texture size, window size). */ { 98 /* Resize down to min(maximum texture size, window size). */ {
99 SDL_Rect dispRect; 99 SDL_Rect dispRect;
100 SDL_GetDisplayBounds(SDL_GetWindowDisplayIndex(window->win), &dispRect); 100 SDL_GetDisplayBounds(SDL_GetWindowDisplayIndex(window->win), &dispRect);
101 const iInt2 maxSize = min_I2(maxTextureSize_Window(window), 101 const iInt2 maxSize = min_I2(isEqual_I2(maxTextureSize_Window(window), zero_I2()) ?
102 texSize : maxTextureSize_Window(window),
102 coord_Window(window, dispRect.w, dispRect.h)); 103 coord_Window(window, dispRect.w, dispRect.h));
103 iInt2 scaled = d->size; 104 iInt2 scaled = d->size;
104 if (scaled.x > maxSize.x) { 105 if (scaled.x > maxSize.x) {