diff options
author | Rémy Raes <raes.remy@gmail.com> | 2024-07-06 12:40:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-06 12:40:36 +0200 |
commit | 497945bbbd18b4ff9cd264dc6a9d6cf8ba6bf08e (patch) | |
tree | 14c2aace20c8356fa2b64f4cb4a641aba40ebcba /primedev/mods/modmanager.cpp | |
parent | 3edcc91c72c96c33f8eae76a7078f78126bbea28 (diff) | |
download | NorthstarLauncher-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/modmanager.cpp')
-rw-r--r-- | primedev/mods/modmanager.cpp | 2 |
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; |