瀏覽代碼

The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const.

Ryan C. Gordon 13 年之前
父節點
當前提交
b63d11ce9c
共有 2 個文件被更改,包括 2 次插入 和 2 次删除
  1. 1 1
      include/SDL_surface.h
  2. 1 1
      src/video/SDL_surface.c

+ 1 - 1
include/SDL_surface.h

@@ -357,7 +357,7 @@ extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
  *  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);
 

+ 1 - 1
src/video/SDL_surface.c

@@ -801,7 +801,7 @@ SDL_UnlockSurface(SDL_Surface * surface)
  * 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;