From e12f6757d5bdd0f03be8f9eb6c1de36bac29b72c Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 5 Feb 2002 05:04:02 +0000 Subject: [PATCH] 1. Enable intro music under MS Windows. (main.cxx) This works on a CygWin build, and probably works on non-Cygwin builds as well. 2. Enable FG to start even if audio is not available. (soundmgr.cxx) Avoids the FGSoundMgr constructor crashing; the rest of FG then runs OK without sound. --- src/Main/main.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 409224a57..75e9f05fb 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -1213,7 +1213,6 @@ static void fgIdleFunction ( void ) { #ifdef ENABLE_AUDIO_SUPPORT // Start the intro music -#if !defined(WIN32) if ( fgGetBool("/sim/startup/intro-music") ) { SGPath mp3file( globals->get_fg_root() ); mp3file.append( "Sounds/intro.mp3" ); @@ -1221,10 +1220,16 @@ static void fgIdleFunction ( void ) { SG_LOG( SG_GENERAL, SG_INFO, "Starting intro music: " << mp3file.str() ); +#if defined( __CYGWIN__ ) + string command = "start /m `cygpath -w " + mp3file.str() + "`"; +#elif defined( WIN32 ) + string command = "start /m " + mp3file.str(); +#else string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1"; +#endif + system ( command.c_str() ); } -#endif // !WIN32 #endif -- 2.39.5