From: Holger Schemel Date: Thu, 8 Jun 2023 00:12:12 +0000 (+0200) Subject: fixed bugs when using music sets without unconfigured game music X-Git-Tag: 4.3.7.0~49 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2c91866598fc7ff9b6a6075c288a6974bfc11965;p=rocksndiamonds.git fixed bugs when using music sets without unconfigured game music Without this fix, playing a level set with an "empty" music set (that has no in-game music, like it is the case for all Emerald Mine Club level sets, for example) caused the game to fall back to the classic (default) game music set, even though using an "empty" music set was by intention in such cases. --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index f9fb34ea..6886e101 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1326,7 +1326,9 @@ static char *getCustomMusicDirectoryExt(boolean check_music) { // 2nd try: look for special artwork configured in level series config directory = getStringCopy(getLevelArtworkDir(TREE_TYPE_MUSIC_DIR)); - if (directoryExists_CheckMusic(directory, check_music)) + + // directory also valid if no unconfigured music found (no game music) + if (directoryExists_CheckMusic(directory, FALSE)) return directory; free(directory); @@ -1340,7 +1342,9 @@ static char *getCustomMusicDirectoryExt(boolean check_music) { // 3rd try: look for special artwork in configured artwork directory directory = getStringCopy(getSetupArtworkDir(artwork.mus_current)); - if (directoryExists_CheckMusic(directory, check_music)) + + // directory also valid if no unconfigured music found (no game music) + if (directoryExists_CheckMusic(directory, FALSE)) return directory; free(directory);