]> git.mxchange.org Git - flightgear.git/commitdiff
1. Enable intro music under MS Windows. (main.cxx)
authorcurt <curt>
Tue, 5 Feb 2002 05:04:02 +0000 (05:04 +0000)
committercurt <curt>
Tue, 5 Feb 2002 05:04:02 +0000 (05:04 +0000)
  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

index 409224a573a82b9135a1aa3b9efdbe3eced1751b..75e9f05fb7b7e8b3902b139b0113785d4f0aed83 100644 (file)
@@ -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