Closed tylerlm closed 1 year ago
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
Oops, you're correct, my mistake!
@icculus, @slouken thank you for catching that, sorry for the breakage!
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.
I thought "surely these three integers will be trivial enough for a baby PR, what could go wrong". Ah well.
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)