Commits

pygame  committed efefe96

rotate 90 bugfix

  • Participants
  • Parent commits 3728fd7

Comments (0)

Files changed (5)

 # BREAK = change breaks existing code
 # BUG	= fixed a bug that was (or could have been) crashing
 
+February 1, 2002
+	locking problem with 90 degree rotate [BUG]
+
 January 31, 2002
 	removed emberrasing debug printing
 	draw.rect does inside edge for bottomright

File docs/index.html

 </li>
 <li><a href=LGPL>LGPL</a> - Gnu lesser general public license</li>
 <li><a href=logos.html>Logos</a> - Pygame Logos
-</li><br>&nbsp;<br><font size=+1><b>Tutorials / Introductions</b></font><br><li><a href=tut/ChimpLineByLine.html>ChimpLineByLine</a> - Line by Line Descriptions of the Chimp Example
+</li><br>&nbsp;<br><font size=+1><b>Tutorials / Introductions</b></font><br><li><a href=tut\ChimpLineByLine.html>ChimpLineByLine</a> - Line by Line Descriptions of the Chimp Example
 </li>
-<li><a href=tut/DisplayModes.html>DisplayModes</a> - Choosing and Configuring Display Modes
+<li><a href=tut\DisplayModes.html>DisplayModes</a> - Choosing and Configuring Display Modes
 </li>
-<li><a href=tut/Executable.html>Executable</a> - Creating a Standalone Windows Executable
+<li><a href=tut\Executable.html>Executable</a> - Creating a Standalone Windows Executable
 </li>
-<li><a href=tut/ImportInit.html>ImportInit</a> - Import and Initialize
+<li><a href=tut\ImportInit.html>ImportInit</a> - Import and Initialize
 </li>
-<li><a href=tut/MoveIt.html>MoveIt</a> - Help! How Do I Move An Image?
+<li><a href=tut\MoveIt.html>MoveIt</a> - Help! How Do I Move An Image?
 </li>
-<li><a href=tut/SpriteIntro.html>SpriteIntro</a> - Sprite Module Introduction
+<li><a href=tut\SpriteIntro.html>SpriteIntro</a> - Sprite Module Introduction
 </li>
-<li><a href=tut/SurfarrayIntro.html>SurfarrayIntro</a> - Introduction to the surfarray module
+<li><a href=tut\SurfarrayIntro.html>SurfarrayIntro</a> - Introduction to the surfarray module
 </li>
-<li><a href=tut/newbieguide.html>Newbieguide</a> - A Newbie Guide To Pygame
+<li><a href=tut\newbieguide.html>Newbieguide</a> - A Newbie Guide To Pygame
 </li>
 <br><hr><br><font size=+1><b>Full Index</b></font><ul>
 <!--FULLINDEX-->

File docs/ref/pygame_display.html

 </tt></font><ul>
 Sets the runtime icon that your system uses to decorate
 the program window. It is also used when the application
-is iconfified. This must be called before the first call
-to <a href=#set_mode>pygame.display.set_mode()</a>.
+is iconified and in the window frame.
 <br>&nbsp;<br>
 You likely want this to be a smaller image, a size that
 your system window manager will be able to deal with. It will

File src/display.c

 staticforward PyTypeObject PyVidInfo_Type;
 static PyObject* PyVidInfo_New(const SDL_VideoInfo* info);
 static PyObject* DisplaySurfaceObject = NULL;
+static int icon_was_set = 0;
+
 
 #if 0
 /*quick internal test to see if gamma is supported*/
 	SDL_Surface* surf;
 	int flags = SDL_SWSURFACE, depth = 0;
 	int w, h, hasbuf;
-	char* title, *icontitle;
-	static int icon_was_set = 0;
+	char *title, *icontitle;
 
 	if(!PyArg_ParseTuple(arg, "(ii)|ii", &w, &h, &flags, &depth))
 		return NULL;
     /*DOC*/    "\n"
     /*DOC*/    "Sets the runtime icon that your system uses to decorate\n"
     /*DOC*/    "the program window. It is also used when the application\n"
-    /*DOC*/    "is iconfified. This must be called before the first call\n"
-    /*DOC*/    "to pygame.display.set_mode().\n"
+    /*DOC*/    "is iconified and in the window frame.\n"
     /*DOC*/    "\n"
     /*DOC*/    "You likely want this to be a smaller image, a size that\n"
     /*DOC*/    "your system window manager will be able to deal with. It will\n"
 	SDL_WM_SetIcon(surf, NULL);
 	PySurface_Unlock(surface);
 
+	icon_was_set = 1;
 	RETURN_NONE
 }
 

File src/transform.c

     dst = newsurf_fromsurf(src, dstwidth, dstheight);
     if(!dst)
         return NULL;
+	SDL_LockSurface(dst);
     srcrow = (char*)src->pixels;
     dstrow = (char*)dst->pixels;
     srcstepx = dststepx = src->format->BytesPerPixel;
                 srcpix += srcstepx; dstpix += dststepx;
             }
             dstrow += dststepy; srcrow += srcstepy;
-        }break;
+        }
     }
+	SDL_UnlockSurface(dst);
     return dst;
 }
 
 
         if(!(((int)angle)%90))
         {
+			PySurface_Lock(surfobj);
             newsurf = rotate90(surf, (int)angle);
+			PySurface_Unlock(surfobj);
             if(!newsurf) return NULL;
             return PySurface_New(newsurf);
         }