From 52fb73468da7c419d6959b6d5b6a21572cf8e275 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= jaakko.keranen@iki.fi
Date: Wed, 31 Mar 2021 09:17:09 +0300
Subject: [PATCH 1/1] Media: Fixed image resizing when there is no maximum
texture size
src/media.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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) {
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).