Pigeons remaining 'crash on no sound device' fix.
This commit is contained in:
parent
1aa1288620
commit
573fb5a50a
1 changed files with 7 additions and 0 deletions
|
@ -129,6 +129,10 @@ FGFX::update (double dt)
|
|||
{
|
||||
SGSoundMgr *smgr = globals->get_soundmgr();
|
||||
|
||||
if (smgr->is_working() == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
// command sound manger
|
||||
bool pause = _pause->getBoolValue();
|
||||
if ( pause != last_pause ) {
|
||||
|
@ -189,6 +193,9 @@ FGFX::play_message( SGSoundSample *_sample )
|
|||
void
|
||||
FGFX::play_message( const string path, const string fname )
|
||||
{
|
||||
if (globals->get_soundmgr()->is_working() == false) {
|
||||
return;
|
||||
}
|
||||
SGSoundSample *sample;
|
||||
sample = new SGSoundSample( path.c_str(), fname.c_str() );
|
||||
play_message( sample );
|
||||
|
|
Loading…
Reference in a new issue