Small fix and improvement for Jukebox path detection
This commit is contained in:
parent
958859e7d6
commit
196a149c71
|
@ -4,6 +4,7 @@ D1X-Rebirth Changelog
|
|||
--------
|
||||
include/args.h, include/physfsx.h, main/newmenu.h, main/inferno.c, main/menu.c, main/songs.c, main/songs.h, main/config.c, main/config.h, main/gameseq.c, main/digiobj.c, main/digi.h, main/game.c, main/gamecntl.c, misc/args.c, d1x.ini, arch/sdl/digi_mixer.c, arch/sdl/digi_mixer_music.c, arch/sdl/init.c, arch/sdl/jukebox.c, arch/sdl/digi.c, arch/sdl/digi_audio.c, arch/include/digi_audio.h, arch/include/digi_mixer.h, arch/include/digi_mixer_music.h, arch/include/jukebox.h: Increased SDL_mixer music abilities to play non-hmp from HOGs, having Level-music path to play, options to specify non-level tracks and added various playing order methods; Abstracted SDL_mixer- and Redbook-interfaces; Simplified program flow through all music functions
|
||||
arch/include/window.h: Added missing newline at EOF
|
||||
arch/sdl/jukebox.c: Small fix and improvement for Jukebox path detection
|
||||
|
||||
20100503
|
||||
--------
|
||||
|
|
|
@ -68,13 +68,26 @@ void jukebox_load() {
|
|||
strncat(GameCfg.CMLevelMusicPath, sep, PATH_MAX - 1 - strlen(GameCfg.CMLevelMusicPath));
|
||||
}
|
||||
|
||||
PHYSFS_addToSearchPath(GameCfg.CMLevelMusicPath, 0);
|
||||
// as mountpoints are no option (yet), make sure only files originating from GameCfg.CMLevelMusicPath are aded to the list.
|
||||
JukeboxSongs = PHYSFSX_findabsoluteFiles("", GameCfg.CMLevelMusicPath, music_exts);
|
||||
|
||||
// If we do not find anything, try to see if given path is child of Searchpath
|
||||
if (JukeboxSongs != NULL)
|
||||
{
|
||||
for (count = 0; JukeboxSongs[count]!=NULL; count++) {}
|
||||
if (!count)
|
||||
{
|
||||
PHYSFSX_getRealPath(GameCfg.CMLevelMusicPath,absolute_path);
|
||||
PHYSFS_addToSearchPath(absolute_path, 0);
|
||||
|
||||
// as mountpoints are no option (yet), make sure only files originating from GameCfg.CMLevelMusicPath are aded to the list.
|
||||
JukeboxSongs = PHYSFSX_findabsoluteFiles("", absolute_path, music_exts);
|
||||
}
|
||||
}
|
||||
|
||||
if (JukeboxSongs != NULL) {
|
||||
count = 0;
|
||||
|
||||
if (JukeboxSongs != NULL)
|
||||
{
|
||||
for (count = 0; JukeboxSongs[count]!=NULL; count++) {}
|
||||
if (count)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue