mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- fixed: $musicalias must be resolved before comparing for equality with the currently playing music.
This commit is contained in:
parent
01917d9f15
commit
1e0366f98f
1 changed files with 11 additions and 9 deletions
|
@ -2375,6 +2375,16 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
FName *aliasp = MusicAliases.CheckKey(musicname);
|
||||
if (aliasp != NULL)
|
||||
{
|
||||
if (*aliasp == NAME_None)
|
||||
{
|
||||
return true; // flagged to be ignored
|
||||
}
|
||||
musicname = aliasp->GetChars();
|
||||
}
|
||||
|
||||
if (!mus_playing.name.IsEmpty() &&
|
||||
mus_playing.handle != NULL &&
|
||||
stricmp (mus_playing.name, musicname) == 0 &&
|
||||
|
@ -2413,16 +2423,8 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
|
|||
int length = 0;
|
||||
int device = MDEV_DEFAULT;
|
||||
MusInfo *handle = NULL;
|
||||
FName musicasname = musicname;
|
||||
|
||||
FName *aliasp = MusicAliases.CheckKey(musicasname);
|
||||
if (aliasp != NULL)
|
||||
{
|
||||
musicname = (musicasname = *aliasp).GetChars();
|
||||
if (musicasname == NAME_None) return true;
|
||||
}
|
||||
|
||||
int *devp = MidiDevices.CheckKey(musicasname);
|
||||
int *devp = MidiDevices.CheckKey(musicname);
|
||||
if (devp != NULL) device = *devp;
|
||||
|
||||
// Strip off any leading file:// component.
|
||||
|
|
Loading…
Reference in a new issue