diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 5f60137a42..4a0d092595 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -56,6 +56,9 @@ #include "PluginManager.h" #include "ConfigManager.h" + +#include "VolumeHandler.h" +#include "FileMonitor.h" #include "MemTools.h" #include "Host.h" @@ -527,6 +530,9 @@ THREAD_RETURN EmuThread(void *pArg) cpuThread = NULL; } + VolumeHandler::EjectVolume(); + FileMon::Close(); + // Stop audio thread - Actually this does nothing on HLE plugin. // But stops the DSP Interpreter on LLE plugin. Plugins.GetDSP()->DSP_StopSoundStream(); diff --git a/Source/Core/DiscIO/Src/FileMonitor.cpp b/Source/Core/DiscIO/Src/FileMonitor.cpp index 854ba8a08d..06f4a7b789 100644 --- a/Source/Core/DiscIO/Src/FileMonitor.cpp +++ b/Source/Core/DiscIO/Src/FileMonitor.cpp @@ -145,5 +145,27 @@ void FindFilename(u64 offset) CheckFile(fname, pFileSystem->GetFileSize(fname)); } +void Close() +{ + if(OpenISO != NULL) + { + delete OpenISO; + OpenISO = NULL; + } + + if(pFileSystem != NULL) + { + delete pFileSystem; + pFileSystem = NULL; + } + + // GCFiles' pointers are no longer valid after pFileSystem is cleared + GCFiles.clear(); + + ISOFile = ""; + CurrentFile = ""; + FileAccess = true; +} + } // FileMon diff --git a/Source/Core/DiscIO/Src/FileMonitor.h b/Source/Core/DiscIO/Src/FileMonitor.h index 9178508610..a54cd544e0 100644 --- a/Source/Core/DiscIO/Src/FileMonitor.h +++ b/Source/Core/DiscIO/Src/FileMonitor.h @@ -28,5 +28,6 @@ void ShowSound(std::string File); void ReadGC(std::string File); void CheckFile(std::string File, int Size); void FindFilename(u64 Offset); +void Close(); } diff --git a/Source/Core/DolphinWX/Src/LogWindow.cpp b/Source/Core/DolphinWX/Src/LogWindow.cpp index a8fafd273e..51a518622e 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogWindow.cpp @@ -80,7 +80,9 @@ void CLogWindow::CreateGUIControls() m_verbosity->SetFont(wxFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); // Font - m_FontChoice = new wxChoice(this, IDM_FONT, wxDefaultPosition, wxDefaultSize, * new wxArrayString(), 0, wxDefaultValidator); + wxArrayString wxArray; + m_FontChoice = new wxChoice(this, IDM_FONT, wxDefaultPosition, wxDefaultSize, wxArray, 0, wxDefaultValidator); + m_FontChoice->Append(wxT("Default font")); m_FontChoice->Append(wxT("Monospaced font")); m_FontChoice->Append(wxT("Selected font"));