SDL_image: Fix compilation: don't allow SAVE_BMP if LOAD_BMP is not set

From 29a7876e38f95789ea8110e4e1f79abb0f8bfcee Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Wed, 22 Oct 2025 14:31:48 +0200
Subject: [PATCH] Fix compilation: don't allow SAVE_BMP if LOAD_BMP is not set

---
 src/IMG_bmp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/IMG_bmp.c b/src/IMG_bmp.c
index 790d92eb..4eaad1b3 100644
--- a/src/IMG_bmp.c
+++ b/src/IMG_bmp.c
@@ -24,6 +24,11 @@
 #define SAVE_BMP 1
 #endif
 
+#ifndef LOAD_BMP
+#undef SAVE_BMP
+#define SAVE_BMP 0
+#endif
+
 #if (!defined(__APPLE__) || defined(SDL_IMAGE_USE_COMMON_BACKEND)) || !defined(BMP_USES_IMAGEIO)
 
 /* This is a BMP image file loading framework