mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-06 17:09:44 +01:00
Move Mix_PausedMusic()
call into wrapper function
This wrapper function is for (a) future-proofing (b) proactive prevention of future copy-pasting (c) to clarify that we never actually halt music in the SDL_mixer sense, we only pause it, so to check if the music is halted we actually check if the music is paused instead. This is important because Mix_PlayingMusic() does not check if the music is paused and Mix_PausedMusic() does not check if the music is halted.
This commit is contained in:
parent
b5501e4b29
commit
6c848a8bb9
2 changed files with 8 additions and 1 deletions
|
@ -399,7 +399,7 @@ void musicclass::processmusic(void)
|
|||
}
|
||||
|
||||
/* This needs to come after processing fades */
|
||||
if (nicefade && Mix_PausedMusic() == 1)
|
||||
if (nicefade && halted())
|
||||
{
|
||||
play(nicechange);
|
||||
nicechange = -1;
|
||||
|
@ -525,3 +525,8 @@ void musicclass::resumeef(void)
|
|||
{
|
||||
Mix_Resume(-1);
|
||||
}
|
||||
|
||||
bool musicclass::halted(void)
|
||||
{
|
||||
return Mix_PausedMusic() == 1;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ public:
|
|||
void pauseef(void);
|
||||
void resumeef(void);
|
||||
|
||||
bool halted(void);
|
||||
|
||||
std::vector<SoundTrack> soundTracks;
|
||||
std::vector<MusicTrack> musicTracks;
|
||||
SoundSystem soundSystem;
|
||||
|
|
Loading…
Reference in a new issue