sdl2: redraw_ibutton() return value
Reply To cazfi
As any non-zero alphablit() return value is considered an error, above can even result in 10 - 10 = 0, like there was no error at all from redraw_ibutton()
That makes this an actual bug, not just a thing to clean up.
redraw_ibutton() header says: "function return (-1) if there are no Icon nor Text. Else return 0."
In reality there's also a return like this:
ret = alphablit(pIcon, NULL, pIButton->dst->surface, &dest, 255);
if (ret) {
return ret - 10;
}
I guess that should return just '-1'. As any non-zero alphablit() return value is considered an error, above can even result in 10 - 10 = 0, like there was no error at all from redraw_ibutton()
Further, there's another alphablit() call where the success is not checked at all.