[sdljava-users] Re: Small patch to SDLVideo.mapRGBA
Status: Beta
Brought to you by:
ivan_ganza
From: Flavio C. <fl...@li...> - 2005-01-25 08:36:19
|
On Mon, 2005-01-24 at 10:42 +0100, Flavio Chierichetti wrote: > Hi, > the mapRGBA method switch the green and blue component (the mapRGB > method works well). While the right order should be RGBA, the native > method is called with RBGA. > > This little patch fixes the problem (I took the file from cvs on the > 21st of this month): > > 457c457 > < return SWIG_SDLVideo.SDL_MapRGBA(format.getSwigPixelFormat(), > (short)r, (short)g, (short)b, (short)a); > --- > > return SWIG_SDLVideo.SDL_MapRGBA(format.getSwigPixelFormat(), > (short)r, (short)b, (short)g, (short)a); The same problem can be found in SDLSurface.java : 939c939 < return SDLVideo.mapRGBA(getFormat(), r, b, g, a); --- > return SDLVideo.mapRGBA(getFormat(), r, g, b, a); Ciao! Flavio P.S.: I've made the previous patch the wrong way around *blush*. I hope this one is good ;) -- Flavio Chierichetti http://lightless.org/ |