The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 04 Sep 2013 23:40:11 -0400
changeset 7725 c61ab95113fe
parent 7724 54c06b0f65d9
child 7727 627ce8499c81
The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const.
include/SDL_surface.h
src/video/SDL_surface.c
--- a/include/SDL_surface.h	Sat Aug 31 01:36:38 2013 -0400
+++ b/include/SDL_surface.h	Wed Sep 04 23:40:11 2013 -0400
@@ -357,7 +357,7 @@
  *  surface.
  */
 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
-    (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
+    (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
     (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
 
--- a/src/video/SDL_surface.c	Sat Aug 31 01:36:38 2013 -0400
+++ b/src/video/SDL_surface.c	Wed Sep 04 23:40:11 2013 -0400
@@ -801,7 +801,7 @@
  * Convert a surface into the specified pixel format.
  */
 SDL_Surface *
-SDL_ConvertSurface(SDL_Surface * surface, SDL_PixelFormat * format,
+SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format,
                    Uint32 flags)
 {
     SDL_Surface *convert;