From 5f25a6ea78605f9f5b600015b7532a06df3f02e2 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 6 Jun 2022 09:36:20 -0400
Subject: [PATCH] Revert "SDL_SetHintWithPriority: better test if hint value
has changed."
Actually, the original test was fine, disregard.
This reverts commit c391bdc1607de896a0f0b577e2b4a57e5f5740b7.
---
src/SDL_hints.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index 4629923d6e0..35eff7adb26 100644
--- a/src/SDL_hints.c
+++ b/src/SDL_hints.c
@@ -66,7 +66,7 @@ SDL_SetHintWithPriority(const char *name, const char *value,
if (priority < hint->priority) {
return SDL_FALSE;
}
- if ( ((hint->value == NULL) != (value == NULL)) || (value && (SDL_strcmp(hint->value, value) != 0)) ) {
+ if (!hint->value || !value || SDL_strcmp(hint->value, value) != 0) {
for (entry = hint->callbacks; entry; ) {
/* Save the next entry in case this one is deleted */
SDL_HintWatch *next = entry->next;