sdlcl icon indicating copy to clipboard operation
sdlcl copied to clipboard

openDOW + sdlcl: black becomes red

Open rofl0r opened this issue 8 years ago • 4 comments

https://github.com/rofl0r/openDOW

LD_LIBRARY_PATH=~/sdlcl ./spriteview.out 

image sdlcl

./spriteview.out 

image normal

rofl0r avatar May 24 '17 15:05 rofl0r

It looks like OpenDOW doesn't look at the actual pixel format of the SDL display surface, so you could end up having a similar issue on SDL 1.2 depending on the video driver used. Having said that, I've changed SDLCL to use the same 32-bit pixel format as SDL 1.2 under X11, which should fix this issue.

MrAlert avatar May 24 '17 19:05 MrAlert

thanks! i've never heard that you're supposed to look at the actual pixel format of the SDL display surfaces. do you know of any resources documenting this?

rofl0r avatar May 24 '17 22:05 rofl0r

You can find what you need in the documentation for SDL_Surface. If you don't need to convert that many colors, you could use SDL_MapRGB() or SDL_MapRGBA().

MrAlert avatar May 25 '17 00:05 MrAlert

ouch. having to call a function for every pixel sounds like performance's gonna take a major hit.

rofl0r avatar May 26 '17 02:05 rofl0r