Fix music going away on unfocus
This commit is contained in:
parent
b93a8215c8
commit
a306d117a8
1 changed files with 6 additions and 3 deletions
|
|
@ -645,14 +645,17 @@ static void Impl_SetFocused(boolean focused)
|
|||
if (window_notinfocus)
|
||||
{
|
||||
if (! cv_playmusicifunfocused.value)
|
||||
S_PauseAudio();
|
||||
I_SetMusicVolume(0);
|
||||
if (! cv_playsoundifunfocused.value)
|
||||
S_StopSounds();
|
||||
S_DisableSound();
|
||||
|
||||
memset(gamekeydown, 0, NUMKEYS); // TODO this is a scary memset
|
||||
}
|
||||
else if (!paused)
|
||||
S_ResumeAudio();
|
||||
{
|
||||
S_InitMusicVolume();
|
||||
S_EnableSound();
|
||||
}
|
||||
}
|
||||
|
||||
static inline void SDLJoyRemap(event_t *event)
|
||||
|
|
|
|||
Loading…
Reference in a new issue