Fixed an issue where the navigation sounds were loaded multiple times on application startup.

This commit is contained in:
Leon Styhre 2023-02-11 12:46:59 +01:00
parent b1dd2dd176
commit 8a60bf0877

View file

@ -1151,7 +1151,7 @@ void ViewController::preload()
// the bundled fallback sound files.
bool themeSoundSupport {false};
for (auto system : SystemData::sSystemVector) {
if (system->getTheme()->hasView("all")) {
if (!themeSoundSupport && system->getTheme()->hasView("all")) {
NavigationSounds::getInstance().loadThemeNavigationSounds(system->getTheme().get());
themeSoundSupport = true;
}