Skip to content

Commit

Permalink
The rectangle argument to SDL_SetClipRect is really const
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 31, 2001
1 parent 1d40e7d commit 9932cc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/SDL_video.h
Expand Up @@ -593,7 +593,7 @@ extern DECLSPEC int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha)
* Note that blits are automatically clipped to the edges of the source
* and destination surfaces.
*/
extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect);
extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);

/*
* Gets the clipping rectangle for the destination surface in a blit.
Expand Down
4 changes: 2 additions & 2 deletions src/video/SDL_surface.c
Expand Up @@ -275,7 +275,7 @@ int SDL_SetAlpha (SDL_Surface *surface, Uint32 flag, Uint8 value)
* return true if the rectangles intersect, false otherwise
*/
static __inline__
SDL_bool SDL_IntersectRect(SDL_Rect *A, SDL_Rect *B, SDL_Rect *intersection)
SDL_bool SDL_IntersectRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *intersection)
{
int Amin, Amax, Bmin, Bmax;

Expand Down Expand Up @@ -308,7 +308,7 @@ SDL_bool SDL_IntersectRect(SDL_Rect *A, SDL_Rect *B, SDL_Rect *intersection)
/*
* Set the clipping rectangle for a blittable surface
*/
SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect)
SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect)
{
SDL_Rect full_rect;

Expand Down

0 comments on commit 9932cc0

Please sign in to comment.