From 2099c54ac7e4b4acace96c2922ec431f60e648d5 Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 19 Mar 2022 22:55:58 +0000 Subject: [PATCH] Remove mix_play_file use of PHYSFSX_getRealPath If the file is accessible via PhysFS, the next branch, based on PHYSFS_openRead, will find it and use it. If it is not accessible via PhysFS, then attempting to resolve its path would fail. Thus, this attempt is redundant regardless of whether the file is reachable by PhysFS. Remove it. --- common/arch/sdl/digi_mixer_music.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/common/arch/sdl/digi_mixer_music.cpp b/common/arch/sdl/digi_mixer_music.cpp index aa4c56f97..e8ca1329b 100644 --- a/common/arch/sdl/digi_mixer_music.cpp +++ b/common/arch/sdl/digi_mixer_music.cpp @@ -193,14 +193,6 @@ int mix_play_file(const char *filename, int loop, void (*const entry_hook_finish return 1; } - // no luck. so it might be in Searchpath. So try to build absolute path - if (PHYSFSX_getRealPath(filename, full_path)) - { - current_music_type = load_mus_file(full_path.data(), loop, hook_finished_track); - if (current_music_type != CurrentMusicType::None) - return 1; - } - // still nothin'? Let's open via PhysFS in case it's located inside an archive { if (RAIIPHYSFS_File filehandle{PHYSFS_openRead(filename)})