projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rnd-20030313-2-src
[rocksndiamonds.git]
/
src
/
libgame
/
misc.c
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index d94b37d55c174a63a3684ca2266ac19ed349dc12..2750b627f09d507494596ff02a83682c9a44d04f 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-307,10
+307,14
@@
unsigned int init_random_number(int nr, long seed)
{
if (seed == NEW_RANDOMIZE)
{
+#if defined(TARGET_SDL)
+ seed = (long)SDL_GetTicks();
+#else
struct timeval current_time;
gettimeofday(¤t_time, NULL);
seed = (long)current_time.tv_usec;
+#endif
}
srandom_linux_libc(nr, (unsigned int) seed);