From 5dc656624a8481b490be485b9dd22045a964546c Mon Sep 17 00:00:00 2001 From: Sour Date: Thu, 28 Dec 2017 20:07:32 -0500 Subject: [PATCH] Fixed sound looping when power cycling VS games with option to show config dialog on power on --- Core/Console.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Console.cpp b/Core/Console.cpp index d735a586..a7640b19 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -73,8 +73,6 @@ void Console::SaveBatteries() bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile) { - SoundMixer::StopAudio(); - if(!_romFilepath.empty() && _mapper) { //Ensure we save any battery file before loading a new game SaveBatteries(); @@ -82,7 +80,7 @@ bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile) //Save current game state before loading another one SaveStateManager::SaveRecentGame(_mapper->GetRomName(), _romFilepath, _patchFilename); } - + if(romFile.IsValid()) { VideoDecoder::GetInstance()->StopThread(); @@ -100,6 +98,8 @@ bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile) BatteryManager::Initialize(FolderUtilities::GetFilename(romFile.GetFileName(), false)); shared_ptr mapper = MapperFactory::InitializeFromFile(romFile.GetFileName(), fileData); if(mapper) { + SoundMixer::StopAudio(); + if(_mapper) { //Send notification only if a game was already running and we successfully loaded the new one MessageManager::SendNotification(ConsoleNotificationType::GameStopped, (void*)1);