mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +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() &&
|
if (!mus_playing.name.IsEmpty() &&
|
||||||
mus_playing.handle != NULL &&
|
mus_playing.handle != NULL &&
|
||||||
stricmp (mus_playing.name, musicname) == 0 &&
|
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 length = 0;
|
||||||
int device = MDEV_DEFAULT;
|
int device = MDEV_DEFAULT;
|
||||||
MusInfo *handle = NULL;
|
MusInfo *handle = NULL;
|
||||||
FName musicasname = musicname;
|
|
||||||
|
|
||||||
FName *aliasp = MusicAliases.CheckKey(musicasname);
|
int *devp = MidiDevices.CheckKey(musicname);
|
||||||
if (aliasp != NULL)
|
|
||||||
{
|
|
||||||
musicname = (musicasname = *aliasp).GetChars();
|
|
||||||
if (musicasname == NAME_None) return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int *devp = MidiDevices.CheckKey(musicasname);
|
|
||||||
if (devp != NULL) device = *devp;
|
if (devp != NULL) device = *devp;
|
||||||
|
|
||||||
// Strip off any leading file:// component.
|
// Strip off any leading file:// component.
|
||||||
|
|
Loading…
Reference in a new issue