From f88896d0ac1a3923868d6873949ba79af7ccbbfe Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 5 Feb 2017 23:10:07 -0800 Subject: [PATCH] Seed the random number generator on startup. --- src/musikbox/Main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/musikbox/Main.cpp b/src/musikbox/Main.cpp index 56d76a4d5..5df2d7344 100644 --- a/src/musikbox/Main.cpp +++ b/src/musikbox/Main.cpp @@ -34,6 +34,9 @@ #include "stdafx.h" +#include +#include + #include #include @@ -88,6 +91,8 @@ int _main(int argc, wchar_t* argv[]) int main(int argc, char* argv[]) #endif { + srand((unsigned int) time(0)); + /* the following allows boost::filesystem to use utf8 on Windows */ std::locale locale = std::locale(); std::locale utf8Locale(locale, new boost::filesystem::detail::utf8_codecvt_facet);