X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fmain.cxx;h=e1a50d6c3798cdfffe813a1afaad1fe46b1ad478;hb=dee0b6459e41f7c08e74321c51f3149f955262a0;hp=fdf0bfd38fb4a8b145d8dc6340d7c293a197e2d7;hpb=c1bb4aec97f0ae8e6bbe970acfd1a5f53127a723;p=flightgear.git diff --git a/src/Main/main.cxx b/src/Main/main.cxx index fdf0bfd38..e1a50d6c3 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -485,8 +485,8 @@ static void fgMainLoop( void ) { // is processing the scenery (doubled the frame-rate for me) -EMH- #ifdef ENABLE_AUDIO_SUPPORT static bool smgr_init = true; + static SGPropertyNode *sound_working = fgGetNode("/sim/sound/working"); if (smgr_init == true) { - static SGPropertyNode *sound_working = fgGetNode("/sim/sound/working"); if (sound_working->getBoolValue() == true) { fgInitSoundManager(); smgr_init = false; @@ -496,6 +496,12 @@ static void fgMainLoop( void ) { static SGSoundMgr *smgr = globals->get_soundmgr(); static bool smgr_enabled = true; + if (sound_working->getBoolValue() == false) { // request to reinit + smgr->reinit(); + smgr->resume(); + sound_working->setBoolValue(true); + } + if (smgr_enabled != sound_enabled->getBoolValue()) { if (smgr_enabled == true) { // request to suspend smgr->suspend(); @@ -783,7 +789,7 @@ static void fgIdleFunction ( void ) { # if defined( __CYGWIN__ ) string command = "start /m `cygpath -w " + mp3file.str() + "`"; -# elif defined( WIN32 ) +# elif defined( _WIN32 ) string command = "start /m " + mp3file.str(); # else string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1"; @@ -891,7 +897,7 @@ bool fgMainInit( int argc, char **argv ) { fgInitFGRoot(argc, argv); // Check for the correct base package version - static char required_version[] = "1.9.0"; + static char required_version[] = "2.0.0"; string base_version = fgBasePackageVersion(); if ( !(base_version == required_version) ) { // tell the operator how to use this application