SDL_ConvertPixels() returns 0 on success
authorSam Lantinga <slouken@libsdl.org>
Mon, 31 Oct 2011 02:44:21 -0400
changeset 6041 69d7539ff51f
parent 6040 08aa9c1dfed6
child 6042 ff2ab1e8d516
SDL_ConvertPixels() returns 0 on success
include/SDL_surface.h
src/video/SDL_surface.c
--- a/include/SDL_surface.h	Mon Oct 31 01:59:54 2011 -0400
+++ b/include/SDL_surface.h	Mon Oct 31 02:44:21 2011 -0400
@@ -355,6 +355,8 @@
 
 /**
  * \brief Copy a block of pixels of one format to another format
+ *  
+ *  \return 0 on success, or -1 if there was an error
  */
 extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
                                               Uint32 src_format,
--- a/src/video/SDL_surface.c	Mon Oct 31 01:59:54 2011 -0400
+++ b/src/video/SDL_surface.c	Mon Oct 31 02:44:21 2011 -0400
@@ -952,7 +952,7 @@
             src = (Uint8*)src + src_pitch;
             dst = (Uint8*)dst + dst_pitch;
         }
-        return SDL_TRUE;
+        return 0;
     }
 
     if (!SDL_CreateSurfaceOnStack(width, height, src_format, (void*)src,