Anonymous avatar Anonymous committed 75d0f73

fix for update()

Comments (0)

Files changed (3)

 - Bob Ippolito for the MacOS and OSX porting (much work!)
 - Jan Ekhol, Ray Kelm, and Peter Nicolai for early design reviews
 - Our list of valiant bug fixers:
-	Niki Spahiev, Gordon Tyler,
+	Niki Spahiev, Gordon Tyler, Nathaniel Pryce
 	Dave Wallace, John Popplewell
 - And our dutiful bug hunters:
 	Angus, Guillaume Proux, Frank Raiser,
 # BREAK = change breaks existing code
 # BUG	= fixed a bug that was (or could have been) crashing
 
+January 14, 2001
+	display.update() boundaries fixed
+
 January 11, 2001
 	Surface.set_clip() can take None to clear the clipping
 
 /*BAD things happen when out-of-bound rects go to updaterect*/
 static GAME_Rect* screencroprect(GAME_Rect* r, int w, int h, GAME_Rect* cur)
 {
-	if(r->x > w || r->y > h || (r->x + r->w) < 0 || (r->y + r->h) < 0)
+	if(r->x > w || r->y > h || (r->x + r->w) <= 0 || (r->y + r->h) <= 0)
 		return 0;
 	else
 	{
 	screen = SDL_GetVideoSurface();
 	if(!screen)
 		return RAISE(PyExc_SDLError, SDL_GetError());
-	wide = screen->w - 1;
-	high = screen->h - 1;
+	wide = screen->w;
+	high = screen->h;
 
 
 	if(screen->flags & SDL_OPENGL)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.