From b7d99d35e29ef74e8754b21b2b8c570c30627dc5 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 16 Apr 2022 22:04:18 -0700 Subject: [PATCH] Audio fixes --- src/pc/lua/utils/smlua_audio_utils.c | 5 ++++- src/pc/network/discord/discord.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pc/lua/utils/smlua_audio_utils.c b/src/pc/lua/utils/smlua_audio_utils.c index 9e832c7e..bc5e0d65 100644 --- a/src/pc/lua/utils/smlua_audio_utils.c +++ b/src/pc/lua/utils/smlua_audio_utils.c @@ -107,7 +107,10 @@ void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolu for (s32 i = 0; i < gLuaActiveMod->fileCount; i++) { struct ModFile* file = &gLuaActiveMod->files[i]; - if (str_ends_with(file->cachedPath, m64path)) { + char relPath[SYS_MAX_PATH] = { 0 }; + snprintf(relPath, SYS_MAX_PATH-1, "%s", file->relativePath); + normalize_path(relPath); + if (str_ends_with(relPath, m64path)) { struct AudioOverride* override = &sAudioOverrides[sequenceId]; smlua_audio_utils_reset(override); LOG_INFO("Loading audio: %s", file->cachedPath); diff --git a/src/pc/network/discord/discord.c b/src/pc/network/discord/discord.c index 0f5b5b2a..36dab9bc 100644 --- a/src/pc/network/discord/discord.c +++ b/src/pc/network/discord/discord.c @@ -28,6 +28,7 @@ static void discord_sdk_log_callback(UNUSED void* hook_data, enum EDiscordLogLev } void discord_fatal_message(int rc) { + return; // TODO FIGURE OUT WHY DISCORD DOES THIS char errorMessage[132] = { 0 }; snprintf(errorMessage, 132, "Discord threw an error.\nTo fix: \n1. Close the game.\n2. Restart Discord.\n3. Start the game.\nRC: %d", rc); djui_popup_create(errorMessage, 6);