changeset 130:14af14ff7c19

The rectangle argument to SDL_SetClipRect is really const
author Sam Lantinga <slouken@libsdl.org>
date Tue, 31 Jul 2001 05:36:10 +0000
parents db0bee1c5845
children 5d08b230932e
files include/SDL_video.h src/video/SDL_surface.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_video.h	Tue Jul 31 04:06:56 2001 +0000
+++ b/include/SDL_video.h	Tue Jul 31 05:36:10 2001 +0000
@@ -593,7 +593,7 @@
  * 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.
--- a/src/video/SDL_surface.c	Tue Jul 31 04:06:56 2001 +0000
+++ b/src/video/SDL_surface.c	Tue Jul 31 05:36:10 2001 +0000
@@ -275,7 +275,7 @@
  * 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;
 
@@ -308,7 +308,7 @@
 /*
  * 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;