mirror of
https://github.com/encounter/SDL.git
synced 2025-06-29 18:03:30 +00:00
SDL_SetHintWithPriority: actually, this test is good.
Otherwise, we end up calling the callback if both the old and new value are NULL. This reverts commit 5f25a6ea78605f9f5b600015b7532a06df3f02e2 (and also trims some whitespace).
This commit is contained in:
parent
30cf26e089
commit
9703f23663
@ -66,7 +66,7 @@ SDL_SetHintWithPriority(const char *name, const char *value,
|
||||
if (priority < hint->priority) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
if (!hint->value || !value || SDL_strcmp(hint->value, value) != 0) {
|
||||
if (((hint->value == NULL) != (value == NULL)) || (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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user