From ca91eb6bb6794b58f16f320735b625c78f96a0d9 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 21 Feb 2021 17:01:50 +0300
Subject: [PATCH] SDL_WM_GetCaption: re-organize with #if 0 / #if 1 to avoid
warnings
---
src/SDL12_compat.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 0f8fabb..9aa4a00 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -3425,17 +3425,17 @@ SDL_WM_GetCaption(const char **title, const char **icon)
DECLSPEC void SDLCALL
SDL_WM_SetIcon(SDL12_Surface *icon12, Uint8 *mask)
{
+#if 1
+ if (VideoWindow20) {
+ SDL20_SetWindowIcon(VideoWindow20, icon12->surface20);
+ }
+#else
SDL_BlendMode blendmode;
Uint32 rmask, gmask, bmask, amask;
SDL_Surface *icon20;
int bpp;
int ret;
- if (VideoWindow20) {
- SDL20_SetWindowIcon(VideoWindow20, icon12->surface20);
- }
- return; ////////
-
// take the mask and zero out those alpha values.
blendmode = SDL_BLENDMODE_NONE;
if (SDL20_GetSurfaceBlendMode(icon12->surface20, &blendmode) < 0) {
@@ -3483,6 +3483,7 @@ SDL_WM_SetIcon(SDL12_Surface *icon12, Uint8 *mask)
SDL20_FreeSurface(VideoIcon20);
VideoIcon20 = icon20;
}
+#endif
}
DECLSPEC int SDLCALL