FS#153 - Fix the initial seed of sf::Randomizer which is always the same on some configurations

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1412 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-02-18 07:34:36 +00:00
parent b3d3082fc4
commit 5bec10de6c

View File

@ -26,8 +26,8 @@
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Randomizer.hpp>
#include <SFML/System/Platform.hpp>
#include <cstdlib>
#include <stdlib.h>
#include <time.h>
namespace
@ -35,7 +35,7 @@ namespace
// Set the random numbers sequence seed with the current system time, so that it is always different
unsigned int SetRandomSeed()
{
unsigned int Seed = static_cast<unsigned int>(sf::priv::Platform::GetSystemTime() * 1000);
unsigned int Seed = static_cast<unsigned int>(time(NULL));
srand(Seed);
return Seed;
}