aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-18 08:15:28 -0700
committerEugene Sandulenko2013-07-18 08:15:28 -0700
commit2c812ade01714351aeda3dbbe877d376ad3d48ca (patch)
tree61daae8cca200b51fdea0c82ecc2d555e97ba865 /common
parent2eb26ad02ead5fc65cc206cb287ff04c84eba4e8 (diff)
parent4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc (diff)
downloadscummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.tar.gz
scummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.tar.bz2
scummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.zip
Merge pull request #353 from clone2727/eventrec_timer_fix
ALL: Don't use EventRecorder at all when not compiled in
Diffstat (limited to 'common')
-rw-r--r--common/random.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/random.cpp b/common/random.cpp
index a74ab831ea..de1269b485 100644
--- a/common/random.cpp
+++ b/common/random.cpp
@@ -30,8 +30,12 @@ RandomSource::RandomSource(const String &name) {
// 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_eventRec.getRandomSeed(name);
- setSeed(seed);
+
+#ifdef ENABLE_EVENTRECORDER
+ setSeed(g_eventRec.getRandomSeed(name));
+#else
+ setSeed(g_system->getMillis());
+#endif
}
void RandomSource::setSeed(uint32 seed) {