change and reset sound volume in SM_GainFocus and SM_LoseFocus;
they're always called, even when exiting to the sys menu
This commit is contained in:
@@ -125,11 +125,16 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
if(!m_Out.IsTransitioning())
|
if(!m_Out.IsTransitioning())
|
||||||
m_Out.StartTransitioning( SM_GoToNextScreen );
|
m_Out.StartTransitioning( SM_GoToNextScreen );
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case SM_GainFocus:
|
||||||
|
if( !GAMESTATE->IsTimeToPlayAttractSounds() )
|
||||||
|
SOUNDMAN->SetPrefs( 0 ); // silent
|
||||||
|
|
||||||
|
case SM_LoseFocus:
|
||||||
|
SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on
|
||||||
|
|
||||||
case SM_GoToNextScreen:
|
case SM_GoToNextScreen:
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
if( !GAMESTATE->IsTimeToPlayAttractSounds() )
|
|
||||||
SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on
|
|
||||||
|
|
||||||
GAMESTATE->Reset();
|
GAMESTATE->Reset();
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user