// game speed list may have changed at this point
if (si->value == &setup.game_speed_extended)
ToggleGameSpeedsListIfNeeded();
+
+ // music state may have changed at this point
+ if (si->value == &setup.sound_music)
+ ToggleMenuMusicIfNeeded();
+
+ // sound state may have changed at this point
+ if (si->value == &setup.sound_simple ||
+ si->value == &setup.sound_loops)
+ ToggleMenuSoundsIfNeeded();
}
static struct TokenInfo *getSetupInfoFinal(struct TokenInfo *setup_info_orig)
#endif
}
+void ToggleMenuMusicIfNeeded(void)
+{
+ setup.sound = (setup.sound_simple || setup.sound_loops || setup.sound_music);
+
+ SetAudioMode(setup.sound);
+
+ if (setup.sound_music)
+ PlayMenuMusic();
+ else
+ FadeMenuMusic();
+}
+
+void ToggleMenuSoundsIfNeeded(void)
+{
+ setup.sound = (setup.sound_simple || setup.sound_loops || setup.sound_music);
+
+ SetAudioMode(setup.sound);
+
+ if (setup.sound_loops)
+ PlayMenuSound();
+ else
+ FadeMenuSounds();
+}
+
void ToggleFullscreenIfNeeded(void)
{
// if setup and video fullscreen state are already matching, nothing do do
void SetLevelSetInfo(char *, int);
void ToggleAudioSampleRateIfNeeded(void);
+void ToggleMenuMusicIfNeeded(void);
+void ToggleMenuSoundsIfNeeded(void);
void ToggleFullscreenIfNeeded(void);
void ChangeWindowScalingIfNeeded(void);
void ChangeVsyncModeIfNeeded(void);