[Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.1,1.2

Robert G?ffringmann lavosspawn at users.sourceforge.net
Sat Dec 20 11:20:02 CET 2003


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv6393/sword1

Modified Files:
	control.cpp 
Log Message:
fix memory leak

Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- control.cpp	20 Dec 2003 09:18:43 -0000	1.1
+++ control.cpp	20 Dec 2003 19:19:42 -0000	1.2
@@ -148,7 +148,6 @@
 	_keyPressed = _numButtons = 0;
 	_screenBuf = (uint8*)malloc(640 * 480);
 	_font = (uint8*)_resMan->openFetchRes(GAME_FONT); // todo: czech support
-	_resMan->resOpen(SR_BUTTON);
 	uint8 *pal = (uint8*)_resMan->openFetchRes(SR_PALETTE);
 	uint8 *palOut = (uint8*)malloc(256 * 4);
 	for (uint16 cnt = 1; cnt < 256; cnt++) {
@@ -197,7 +196,7 @@
 		delay(1000 / 12);
 		newMode = getClicks(mode, &retVal);
 	} while ((newMode != 1) && (retVal == 0));
-	_resMan->resClose(SR_BUTTON);
+	destroyButtons();
 	memset(_screenBuf, 0, 640 * 480);
 	_system->copy_rect(_screenBuf, 640, 0, 0, 640, 480);
 	free(_screenBuf);





More information about the Scummvm-git-logs mailing list