[Scummvm-cvs-logs] SF.net SVN: scummvm: [22772] scummvm/trunk/backends/psp/osys_psp.cpp

joostp at users.sourceforge.net joostp at users.sourceforge.net
Tue May 30 09:21:05 CEST 2006


Revision: 22772
Author:   joostp
Date:     2006-05-30 09:19:56 -0700 (Tue, 30 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22772&view=rev

Log Message:
-----------
- fix bug in copyRectToOverlay() that was introduced after _overlayScale cleanup.
- implement grabOverlay()

Modified Paths:
--------------
    scummvm/trunk/backends/psp/osys_psp.cpp
Modified: scummvm/trunk/backends/psp/osys_psp.cpp
===================================================================
--- scummvm/trunk/backends/psp/osys_psp.cpp	2006-05-30 12:42:51 UTC (rev 22771)
+++ scummvm/trunk/backends/psp/osys_psp.cpp	2006-05-30 16:19:56 UTC (rev 22772)
@@ -247,6 +247,14 @@
 }
 
 void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) {
+	int h = _overlayHeight;
+	OverlayColor *src = _overlayBuffer;
+
+	do {
+		memcpy(buf, src, _overlayWidth * sizeof(OverlayColor));
+		src += _overlayWidth;
+		buf += pitch;
+	} while (--h);
 }
 
 void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
@@ -278,7 +286,7 @@
 
 	
 	OverlayColor *dst = _overlayBuffer + (y * _overlayWidth + x);
-	if (_screenWidth == pitch && pitch == w) {
+	if (_overlayWidth == pitch && pitch == w) {
 		memcpy(dst, buf, h * w * sizeof(OverlayColor));
 	} else {
 		do {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list