mirror of
https://github.com/yawut/SDL.git
synced 2026-08-19 23:34:04 -05:00
Fixed bug 1763 - Constify SDL_UpdateWindowSurfaceRects()
Ryan C. Gordon With this function... SDL_UpdateWindowSurfaceRects(SDL_Window * window, SDL_Rect * rects, int numrects); ...is there any reason rects isn't "const SDL_Rect *" ?
This commit is contained in:
@@ -694,7 +694,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
|
||||
* \sa SDL_UpdateWindowSurfaceRect()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
||||
SDL_Rect * rects,
|
||||
const SDL_Rect * rects,
|
||||
int numrects);
|
||||
|
||||
/**
|
||||
|
||||
@@ -412,7 +412,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
|
||||
|
||||
SDL_bool
|
||||
SDL_GetSpanEnclosingRect(int width, int height,
|
||||
int numrects, SDL_Rect * rects, SDL_Rect *span)
|
||||
int numrects, const SDL_Rect * rects, SDL_Rect *span)
|
||||
{
|
||||
int i;
|
||||
int span_y1, span_y2;
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
extern SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, SDL_Rect * rects, SDL_Rect *span);
|
||||
extern SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, const SDL_Rect * rects, SDL_Rect *span);
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -199,7 +199,7 @@ struct SDL_VideoDevice
|
||||
void (*SetWindowGrab) (_THIS, SDL_Window * window, SDL_bool grabbed);
|
||||
void (*DestroyWindow) (_THIS, SDL_Window * window);
|
||||
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);
|
||||
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, SDL_Rect * rects, int numrects);
|
||||
int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects);
|
||||
void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
|
||||
|
||||
/* * * */
|
||||
|
||||
@@ -308,7 +308,7 @@ SDL_CreateWindowTexture(_THIS, SDL_Window * window, Uint32 * format, void ** pix
|
||||
}
|
||||
|
||||
static int
|
||||
SDL_UpdateWindowTexture(_THIS, SDL_Window * window, SDL_Rect * rects, int numrects)
|
||||
SDL_UpdateWindowTexture(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects)
|
||||
{
|
||||
SDL_WindowTextureData *data;
|
||||
SDL_Rect rect;
|
||||
@@ -1841,7 +1841,7 @@ SDL_UpdateWindowSurface(SDL_Window * window)
|
||||
}
|
||||
|
||||
int
|
||||
SDL_UpdateWindowSurfaceRects(SDL_Window * window, SDL_Rect * rects,
|
||||
SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects,
|
||||
int numrects)
|
||||
{
|
||||
CHECK_WINDOW_MAGIC(window, -1);
|
||||
|
||||
@@ -98,7 +98,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||
|
||||
|
||||
int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||
SDL_Rect * rects, int numrects) {
|
||||
const SDL_Rect * rects, int numrects) {
|
||||
if(!window)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ extern int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||
Uint32 * format,
|
||||
void ** pixels, int *pitch);
|
||||
extern int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||
SDL_Rect * rects, int numrects);
|
||||
const SDL_Rect * rects, int numrects);
|
||||
extern void BE_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
|
||||
extern int32 BE_DrawThread(void *data);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * forma
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects, int numrects)
|
||||
int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects)
|
||||
{
|
||||
static int frame_number;
|
||||
SDL_Surface *surface;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "SDL_config.h"
|
||||
|
||||
extern int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);
|
||||
extern int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects, int numrects);
|
||||
extern int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects);
|
||||
extern void SDL_DUMMY_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -93,7 +93,7 @@ int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, voi
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects, int numrects)
|
||||
int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects)
|
||||
{
|
||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "SDL_config.h"
|
||||
|
||||
extern int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);
|
||||
extern int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects, int numrects);
|
||||
extern int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects);
|
||||
extern void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -148,7 +148,7 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format,
|
||||
}
|
||||
|
||||
int
|
||||
X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, SDL_Rect * rects,
|
||||
X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects,
|
||||
int numrects)
|
||||
{
|
||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||
|
||||
@@ -25,7 +25,7 @@ extern int X11_CreateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||
Uint32 * format,
|
||||
void ** pixels, int *pitch);
|
||||
extern int X11_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
|
||||
SDL_Rect * rects, int numrects);
|
||||
const SDL_Rect * rects, int numrects);
|
||||
extern void X11_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
Reference in New Issue
Block a user