-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL_SetPalette incorrect return value? #294
Comments
Thanks! I think the no-ops on lines 7306,7310,7315 should also be 1. |
No, they return 0 in classic SDL 1.2, also: https://github.com/libsdl-org/SDL-1.2/blob/main/src/video/SDL_video.c#L1280-L1282 https://github.com/libsdl-org/SDL-1.2/blob/main/src/video/SDL_video.c#L1291-L1295 |
Ahem, my merge needs to be reverted; is this appropriate? I thought "surely these three integers will be trivial enough for a baby PR, what could go wrong". Ah well. |
Revert incorrect change, see libsdl-org#294
No worries, thank you for taking interest in the tiny details! |
In SDL 1.2, SDL_SetPalette returns 1 on success ("if all colors were set as requested") or 0 otherwise: SDL_video.c
In sdl12-compat, SDL_SetPalette returns 0 on success, or -1 or SDL20_OutOfMemory() on failure: SDL12_compat.c
(Other issues that mention the call are #216 and #283, though I'm not sure they're related)
The text was updated successfully, but these errors were encountered: