[Scummvm-cvs-logs] SF.net SVN: scummvm:[48628] scummvm/trunk/engines/engine.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Apr 11 21:04:24 CEST 2010


Revision: 48628
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48628&view=rev
Author:   fingolfin
Date:     2010-04-11 19:04:24 +0000 (Sun, 11 Apr 2010)

Log Message:
-----------
Explain the rational of the CursorMan.pushCursor calls directly
Instead of referring to the commit log of a prior ref.
Also rewrap some comments.

Modified Paths:
--------------
    scummvm/trunk/engines/engine.cpp

Modified: scummvm/trunk/engines/engine.cpp
===================================================================
--- scummvm/trunk/engines/engine.cpp	2010-04-11 19:04:02 UTC (rev 48627)
+++ scummvm/trunk/engines/engine.cpp	2010-04-11 19:04:24 UTC (rev 48628)
@@ -99,22 +99,28 @@
 	Common::setErrorOutputFormatter(defaultOutputFormatter);
 	Common::setErrorHandler(defaultErrorHandler);
 
-	// FIXME: Get rid of the following again. It is only here temporarily.
-	// We really should never run with a non-working Mixer, so ought to handle
-	// this at a much earlier stage. If we *really* want to support systems
-	// without a working mixer, then we need more work. E.g. we could modify the
-	// Mixer to immediately drop any streams passed to it. This way, at least
-	// we don't crash because heaps of (sound) memory get allocated but never
-	// freed. Of course, there still would be problems with many games...
+	// FIXME: Get rid of the following again. It is only here
+	// temporarily. We really should never run with a non-working Mixer,
+	// so ought to handle this at a much earlier stage. If we *really*
+	// want to support systems without a working mixer, then we need
+	// more work. E.g. we could modify the Mixer to immediately drop any
+	// streams passed to it. This way, at least we don't crash because
+	// heaps of (sound) memory get allocated but never freed. Of course,
+	// there still would be problems with many games...
 	if (!_mixer->isReady())
 		warning("Sound initialization failed. This may cause severe problems in some games.");
 
-	// Setup a dummy cursor and palette, so that all engines can use CursorMan.replace
-	// without having any headaches about memory leaks. Check commit log of r48620 for
-	// some information about this.
+	// Setup a dummy cursor and palette, so that all engines can use
+	// CursorMan.replace without having any headaches about memory leaks.
+	//
+	// If an engine only used CursorMan.replaceCursor and no cursor has
+	// been setup before, then replaceCursor just uses pushCursor. This
+	// means that that the engine's cursor is never again removed from
+	// CursorMan. Hence we setup a fake cursor here and remove it again
+	// in the destructor.
 	CursorMan.pushCursor(NULL, 0, 0, 0, 0, 0);
-	// Note: Using this dummy palette will actually disable cursor palettes till the
-	// user enables it again.
+	// Note: Using this dummy palette will actually disable cursor
+	// palettes till the user enables it again.
 	CursorMan.pushCursorPalette(NULL, 0, 0);
 }
 


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