1. pygame
  2. pygame
  3. pygame

Commits

pygame  committed 75d0f73

fix for update()

  • Participants
  • Parent commits 27e6745
  • Branches default

Comments (0)

Files changed (3)

File README.TXT

View file
  • Ignore whitespace
 - 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,

File WHATSNEW

View file
  • Ignore whitespace
 # 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
 

File src/display.c

View file
  • Ignore whitespace
 /*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)