Uint8 g
Uint8 b
CODE:
- RETVAL = SDL_MapRGB(pixel_format,r,g,b);
+ Uint32 value = SDL_MapRGB(pixel_format, r,g,b);
+ if(value > 0)
+ {
+ RETVAL = value;
+ }
+ else
+ {
+ warn( "SDL_MapRGB failed: %s", SDL_GetError() );
+ RETVAL = -1;
+ }
OUTPUT:
RETVAL
Uint8 b
Uint8 a
CODE:
- RETVAL = SDL_MapRGBA(pixel_format,r,g,b,a);
+ Uint32 value = SDL_MapRGBA(pixel_format, r,g,b,a );
+ if(value > 0)
+ {
+ RETVAL = value;
+ }
+ else
+ {
+ warn( "SDL_MapRGBA failed: %s", SDL_GetError() );
+ RETVAL = -1;
+ }
+
OUTPUT:
RETVAL