[Scummvm-cvs-logs] SF.net SVN: scummvm: [22787] scummvm/trunk/backends/psp/osys_psp.cpp
joostp at users.sourceforge.net
joostp at users.sourceforge.net
Tue May 30 14:23:18 CEST 2006
Revision: 22787
Author: joostp
Date: 2006-05-30 14:22:52 -0700 (Tue, 30 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22787&view=rev
Log Message:
-----------
free old buffers when changing resolution in the non-GU backend (not that it's ever used, but anyway)
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 20:46:04 UTC (rev 22786)
+++ scummvm/trunk/backends/psp/osys_psp.cpp 2006-05-30 21:22:52 UTC (rev 22787)
@@ -115,8 +115,15 @@
void OSystem_PSP::initSize(uint width, uint height) {
_overlayWidth = _screenWidth = width;
_overlayHeight = _screenHeight = height;
+
+ if (_offscreen)
+ free(_offscreen);
+
_offscreen = (byte *)malloc(width * height);
+ if (_overlayBuffer)
+ free(_overlayBuffer);
+
_overlayBuffer = (OverlayColor *)malloc(_overlayWidth * _overlayHeight * sizeof(OverlayColor));
bzero(_offscreen, width * height);
clearOverlay();
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