From a291a1a4e9e853539c6830bcf1577166701a9d35 Mon Sep 17 00:00:00 2001
From: Tyler Morgan <[EMAIL REDACTED]>
Date: Tue, 30 May 2023 18:26:00 +0200
Subject: [PATCH] video: Correct SDL_SetPalette no-op returns
#294
---
src/SDL12_compat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 5b4536a4e..996ff34a5 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -7303,16 +7303,16 @@ SDL_SetPalette(SDL12_Surface *surface12, int flags, const SDL_Color *colors,
int i, retval;
if (!surface12) {
- return 0; /* not an error, a no-op. */
+ return 1; /* not an error, a no-op. */
}
if ((flags & (SDL12_LOGPAL | SDL12_PHYSPAL)) == 0) {
- return 0; /* nothing to do. */
+ return 1; /* nothing to do. */
}
palette12 = surface12->format->palette;
if (!palette12) {
- return 0; /* not an error, a no-op. */
+ return 1; /* not an error, a no-op. */
}
palette20 = surface12->surface20->format->palette;