Menu

#4 sdljava.video.SDLSurface.isSrcAlphaBlit

open
nobody
None
5
2007-05-06
2007-05-06
Anonymous
No

This method always returs false.

public boolean isSrcAlphaBlit() {
return ((getFlags() & SDLVideo.SDL_SRCCOLORKEY) == SDLVideo.SDL_SRCALPHA);
}

It does a bitwise AND with 0x00001000 and comparison with 0x00010000, which is always false.
I suggest using

(getFlags() & SDLVideo.SDL_SRCCOLORKEY) != 0

Shorter, correct and less error-prone.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.