aboutsummaryrefslogtreecommitdiff
path: root/primedev/mods
diff options
context:
space:
mode:
authorRémy Raes <raes.remy@gmail.com>2024-07-06 12:40:36 +0200
committerGitHub <noreply@github.com>2024-07-06 12:40:36 +0200
commit497945bbbd18b4ff9cd264dc6a9d6cf8ba6bf08e (patch)
tree14c2aace20c8356fa2b64f4cb4a641aba40ebcba /primedev/mods
parent3edcc91c72c96c33f8eae76a7078f78126bbea28 (diff)
downloadNorthstarLauncher-497945bbbd18b4ff9cd264dc6a9d6cf8ba6bf08e.tar.gz
NorthstarLauncher-497945bbbd18b4ff9cd264dc6a9d6cf8ba6bf08e.zip
Fix multiple audio file overrides (#677)v1.26.3-rc1v1.26.2v1.26.1-rc5v1.26.1-rc4v1.26.1
This basically prevents audio files from being loaded into memory if matching audio event has already been overriden by a previous mod, preventing a crash from occurring. This means that audio mods now respect the load priority, i.e. mods with higher priority (= lower int value) will have priority over other mods on audio overrides.
Diffstat (limited to 'primedev/mods')
-rw-r--r--primedev/mods/modmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/primedev/mods/modmanager.cpp b/primedev/mods/modmanager.cpp
index edf69c9f..68f9bd0f 100644
--- a/primedev/mods/modmanager.cpp
+++ b/primedev/mods/modmanager.cpp
@@ -972,7 +972,7 @@ void ModManager::LoadMods()
{
if (fs::is_regular_file(file) && file.path().extension().string() == ".json")
{
- if (!g_CustomAudioManager.TryLoadAudioOverride(file.path()))
+ if (!g_CustomAudioManager.TryLoadAudioOverride(file.path(), mod.Name))
{
spdlog::warn("Mod {} has an invalid audio def {}", mod.Name, file.path().filename().string());
continue;