mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user