mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-12-05 15:43:02 +00:00
Fix audio file not found on Windows
This commit is contained in:
parent
c15748d995
commit
70530b1bde
1 changed files with 6 additions and 1 deletions
|
|
@ -239,13 +239,18 @@ struct ModAudio* audio_load_internal(const char* filename, bool isStream) {
|
|||
const char *filepath = filename;
|
||||
if (!is_mod_fs_file(filename)) {
|
||||
|
||||
// normalize filename
|
||||
char normPath[SYS_MAX_PATH] = { 0 };
|
||||
snprintf(normPath, SYS_MAX_PATH, "%s", filename);
|
||||
normalize_path(normPath);
|
||||
|
||||
// find mod file in mod list
|
||||
bool foundModFile = false;
|
||||
struct ModFile* modFile = NULL;
|
||||
u16 fileCount = gLuaActiveMod->fileCount;
|
||||
for (u16 i = 0; i < fileCount; i++) {
|
||||
struct ModFile* file = &gLuaActiveMod->files[i];
|
||||
if(path_ends_with(file->relativePath, filename)) {
|
||||
if(path_ends_with(file->relativePath, normPath)) {
|
||||
foundModFile = true;
|
||||
modFile = file;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue