[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/video graphic.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/video graphic.c |
Date: |
22 Jan 2004 09:00:02 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/22 09:00:02
Modified files:
src/video : graphic.c
Log message:
Fixed bug flipping graphic
Patches:
Index: stratagus/src/video/graphic.c
diff -u stratagus/src/video/graphic.c:1.67 stratagus/src/video/graphic.c:1.68
--- stratagus/src/video/graphic.c:1.67 Tue Jan 20 00:03:46 2004
+++ stratagus/src/video/graphic.c Thu Jan 22 09:00:02 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: graphic.c,v 1.67 2004/01/19 13:03:46 nobody_ Exp $
+// $Id: graphic.c,v 1.68 2004/01/21 22:00:02 jsalmon3 Exp $
//@{
@@ -282,13 +282,15 @@
graphic->Width * graphic->Height *
graphic->Surface->format->BytesPerPixel;
#endif
+ SDL_LockSurface(graphic->Surface);
SDL_LockSurface(s);
for (i = 0; i < s->h; ++i) {
for (j = 0; j < s->w; ++j) {
- ((char*)s->pixels)[j + i * s->w] =
- ((char*)graphic->Surface->pixels)[s->w - j - 1
+ i * s->w];
+ ((char*)s->pixels)[j + i * s->pitch] =
+ ((char*)graphic->Surface->pixels)[s->w - j - 1
+ i * graphic->Surface->pitch];
}
}
+ SDL_UnlockSurface(graphic->Surface);
SDL_UnlockSurface(s);
#endif
}