mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 12:39:57 +00:00
Initialize random seed in main.cpp.
This commit is contained in:
parent
61b6500f72
commit
e976005cdd
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user