X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=2750b627f09d507494596ff02a83682c9a44d04f;hb=3440a4bbdb7531fc5a72b3fc1fb57f245d59f7ed;hp=d94b37d55c174a63a3684ca2266ac19ed349dc12;hpb=6435b79b71c4033de78ab3e611ee63f6a2147874;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index d94b37d5..2750b627 100644 --- 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);