Use mutexes in LogManager to make it threadsafe, as suggested by beistin's patch. Change some LogManager function names to be consistent with Dolphin's naming conventions.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7433 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak
2011-04-01 07:43:02 +00:00
parent 7a9a47376f
commit 021193b22f
10 changed files with 132 additions and 137 deletions

View File

@ -93,9 +93,11 @@ void ReadGC(std::string FileName)
void CheckFile(std::string File, u64 Size)
{
// Don't do anything if the log is unselected
if (!LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) return;
if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON))
return;
// Do nothing if we found the same file again
if (CurrentFile == File) return;
if (CurrentFile == File)
return;
if (Size > 0) Size = (Size / 1000);
std::string Str = StringFromFormat("%s kB %s", ThousandSeparate(Size, 7).c_str(), File.c_str());
@ -119,7 +121,7 @@ void FindFilename(u64 offset)
// Don't do anything if a game is not running
if (Core::GetState() != Core::CORE_RUN) return;
// Or if the log is unselected
if (!LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) return;
if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) return;
if (!FileAccess) return;
if (!pFileSystem || ISOFile != SConfig::GetInstance().m_LastFilename)