[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/video graphic.c
From: |
Nehal Mistry |
Subject: |
[Stratagus-CVS] stratagus/src/video graphic.c |
Date: |
Mon, 17 Nov 2003 19:39:41 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Nehal Mistry <address@hidden> 03/11/17 19:39:41
Modified files:
src/video : graphic.c
Log message:
dont lock surface when resizing if dest width == src width
Patches:
Index: stratagus/src/video/graphic.c
diff -u stratagus/src/video/graphic.c:1.48 stratagus/src/video/graphic.c:1.49
--- stratagus/src/video/graphic.c:1.48 Mon Nov 17 17:49:29 2003
+++ stratagus/src/video/graphic.c Mon Nov 17 19:39:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: graphic.c,v 1.48 2003/11/17 22:49:29 nehalmistry Exp $
+// $Id: graphic.c,v 1.49 2003/11/18 00:39:40 nehalmistry Exp $
//@{
@@ -769,14 +769,18 @@
SDL_Color pal[256];
DebugCheck(g->Surface->format->BytesPerPixel != 1);
+ if (g->Width == w && g->Height == h) {
+ return;
+ }
+
SDL_LockSurface(g->Surface);
#else
DebugCheck(g->Type != &GraphicImage8Type);
-#endif
if (g->Width == w && g->Height == h) {
return;
}
+#endif
data = (unsigned char*)malloc(w * h);
#ifdef DEBUG