mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an
atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. SVN r2188 (trunk)
This commit is contained in:
parent
61865b30be
commit
758327f4b3
2 changed files with 5 additions and 2 deletions
|
@ -198,7 +198,7 @@ int FPlayList::Advance ()
|
|||
|
||||
int FPlayList::Backup ()
|
||||
{
|
||||
if (--Position < 0)
|
||||
if (Position-- == 0)
|
||||
{
|
||||
Position = Songs.Size() - 1;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,10 @@ CUSTOM_CVAR (Float, snd_musicvolume, 0.5f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
else
|
||||
{
|
||||
// Set general music volume.
|
||||
GSnd->SetMusicVolume(clamp<float>(self * relative_volume, 0, 1));
|
||||
if (GSnd != NULL)
|
||||
{
|
||||
GSnd->SetMusicVolume(clamp<float>(self * relative_volume, 0, 1));
|
||||
}
|
||||
// For music not implemented through the digital sound system,
|
||||
// let them know about the change.
|
||||
if (currSong != NULL)
|
||||
|
|
Loading…
Reference in a new issue