From 5efa20d772e9ec32828ac4b98d17f3b3810b6efa Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 30 Jul 2008 20:12:49 +0000 Subject: [PATCH] moved initialization of RNG to top of main() git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1412 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 1 + src/core/main.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ae877bfb..0379cccf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ - added --dump parameter for easily uncompressing mmpz-files - try to set realtime priority after command-line parsing as the resulting warning might be annoying at this place + - moved initialization of RNG to top of main() * src/core/mmp.cpp: quirks for loading drumsynth-samples whose directory-names have diff --git a/src/core/main.cpp b/src/core/main.cpp index 07e7fae94..1e08acb53 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -80,6 +80,9 @@ inline void loadTranslation( const QString & _tname, int main( int argc, char * * argv ) { + // intialize RNG + srand( getpid() + time( 0 ) ); + bool core_only = FALSE; for( int i = 1; i < argc; ++i ) @@ -332,8 +335,6 @@ int main( int argc, char * * argv ) #endif #endif - srand( getpid() + time( 0 ) ); - if( !configManager::inst()->loadConfigFile() ) { printf( "could not load config file!\n" );