mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- SW: fixed crash with credits screen and CD tracks missing.
This commit is contained in:
parent
4c915180da
commit
b15810e173
1 changed files with 5 additions and 1 deletions
|
@ -946,7 +946,7 @@ int PlayerYellVocs[] =
|
|||
bool PlaySong(const char* mapname, const char* song_file_name, int cdaudio_track, bool isThemeTrack) //(nullptr, nullptr, -1, false) starts the normal level music.
|
||||
{
|
||||
// Play CD audio if enabled.
|
||||
if (cdaudio_track >= 0 && (mus_redbook || *song_file_name == 0))
|
||||
if (cdaudio_track >= 0 && (mus_redbook || !song_file_name || *song_file_name == 0))
|
||||
{
|
||||
FStringf trackname("track%02d.ogg", cdaudio_track);
|
||||
if (!Mus_Play(mapname, trackname, true))
|
||||
|
@ -955,6 +955,10 @@ bool PlaySong(const char* mapname, const char* song_file_name, int cdaudio_track
|
|||
}
|
||||
else return true;
|
||||
}
|
||||
if (!song_file_name || *song_file_name == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!Mus_Play(mapname, song_file_name, true))
|
||||
{
|
||||
// try the CD track anyway if no MIDI could be found (the original game doesn't have any MIDI, it was CD Audio only, this avoids no music playing if mus_redbook is off.)
|
||||
|
|
Loading…
Reference in a new issue