mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- fixed crash when loading saved game that has no music
This commit is contained in:
parent
c37dcc6eb4
commit
426f40dd52
1 changed files with 10 additions and 9 deletions
|
@ -118,15 +118,6 @@ public:
|
||||||
|
|
||||||
static FString LookupMusic(const char* musicname, int& order)
|
static FString LookupMusic(const char* musicname, int& order)
|
||||||
{
|
{
|
||||||
if (strnicmp(musicname, ",CD,", 4) == 0)
|
|
||||||
{
|
|
||||||
static bool warned = false;
|
|
||||||
if (!warned)
|
|
||||||
Printf(TEXTCOLOR_RED "CD Audio no longer supported\n");
|
|
||||||
warned = true;
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// allow specifying "*" as a placeholder to play the level's default music.
|
// allow specifying "*" as a placeholder to play the level's default music.
|
||||||
if (musicname != nullptr && !strcmp(musicname, "*"))
|
if (musicname != nullptr && !strcmp(musicname, "*"))
|
||||||
{
|
{
|
||||||
|
@ -146,6 +137,16 @@ static FString LookupMusic(const char* musicname, int& order)
|
||||||
// got nothing, return nothing.
|
// got nothing, return nothing.
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strnicmp(musicname, ",CD,", 4) == 0)
|
||||||
|
{
|
||||||
|
static bool warned = false;
|
||||||
|
if (!warned)
|
||||||
|
Printf(TEXTCOLOR_RED "CD Audio no longer supported\n");
|
||||||
|
warned = true;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
if (*musicname == '/') musicname++;
|
if (*musicname == '/') musicname++;
|
||||||
|
|
||||||
FString DEH_Music;
|
FString DEH_Music;
|
||||||
|
|
Loading…
Reference in a new issue