aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2010-04-11 19:04:24 +0000
committerMax Horn2010-04-11 19:04:24 +0000
commit3745c737887b9191a3785110a14cf4d3921b9a4b (patch)
tree864cc331e2756c44fb7fa771a3d0906c541fa276 /engines
parentf2ff555996b2711685c86d5332e9899a2d2511b4 (diff)
downloadscummvm-rg350-3745c737887b9191a3785110a14cf4d3921b9a4b.tar.gz
scummvm-rg350-3745c737887b9191a3785110a14cf4d3921b9a4b.tar.bz2
scummvm-rg350-3745c737887b9191a3785110a14cf4d3921b9a4b.zip
Explain the rational of the CursorMan.pushCursor calls directly
Instead of referring to the commit log of a prior ref. Also rewrap some comments. svn-id: r48628
Diffstat (limited to 'engines')
-rw-r--r--engines/engine.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index b7d2c40344..34d6ab504a 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -99,22 +99,28 @@ Engine::Engine(OSystem *syst)
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);
}