Initialize random seed in main.cpp.

This commit is contained in:
David Capello 2012-08-16 11:17:49 -03:00
parent 61b6500f72
commit e976005cdd

View File

@ -27,6 +27,9 @@
#include "she/she.h" #include "she/she.h"
#include "ui/base.h" #include "ui/base.h"
#include <cstdlib>
#include <ctime>
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#endif #endif
@ -71,6 +74,9 @@ static bool get_memory_dump_filename(std::string& filename)
// ASEPRITE entry point // ASEPRITE entry point
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
// Initialize the random seed.
std::srand(static_cast<unsigned int>(std::time(NULL)));
#ifdef WIN32 #ifdef WIN32
CoInitialize(NULL); CoInitialize(NULL);
#endif #endif