From 000bd32af362b81bce1f9c2abf9a122ceb4b29dd Mon Sep 17 00:00:00 2001 From: eihrul Date: Sun, 20 Mar 2011 14:32:43 +0000 Subject: [PATCH] fix row order of screen to texture copies git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10947 d7cf8633-e32d-0410-b094-e92efae38249 --- dpsoftrast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpsoftrast.c b/dpsoftrast.c index 93b42ada..652105bb 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -1246,8 +1246,9 @@ void DPSOFTRAST_CopyRectangleToTexture(int index, int mip, int tx, int ty, int s if (th > sh) th = sh; if (tw < 1 || th < 1) return; + sy1 = sheight - 1 - sy1; for (y = 0;y < th;y++) - memcpy(tpixels + ((ty1 + y) * twidth + tx1), spixels + ((sy1 + y) * swidth + sx1), tw*4); + memcpy(tpixels + ((ty1 + y) * twidth + tx1), spixels + ((sy1 - y) * swidth + sx1), tw*4); if (texture->mipmaps > 1) DPSOFTRAST_Texture_CalculateMipmaps(index); } -- 2.39.2