[Scummvm-cvs-logs] SF.net SVN: scummvm: [29736] scummvm/trunk/common/util.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Dec 6 19:48:44 CET 2007
Revision: 29736
http://scummvm.svn.sourceforge.net/scummvm/?rev=29736&view=rev
Author: thebluegr
Date: 2007-12-06 10:48:44 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
Reverted commit #29733, as RandomSource() is called before g_system is initialized (e.g. from sound/fmopl.cpp)
Modified Paths:
--------------
scummvm/trunk/common/util.cpp
Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp 2007-12-06 12:46:29 UTC (rev 29735)
+++ scummvm/trunk/common/util.cpp 2007-12-06 18:48:44 UTC (rev 29736)
@@ -154,8 +154,11 @@
RandomSource::RandomSource() {
// Use system time as RNG seed. Normally not a good idea, if you are using
// a RNG for security purposes, but good enough for our purposes.
- assert(g_system);
- uint32 seed = g_system->getMillis();
+#if defined (__SYMBIAN32__) && defined (__WINS__)
+ uint32 seed = 0; // Symbian produces RT crash on time(0)
+#else
+ uint32 seed = time(0);
+#endif
setSeed(seed);
}
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