Fixed up the filemon a bit, added isEnable function to the logmanager
and moved the FileMonitor from debug to discio to prevert cross dependencies git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4197 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7badedf054
commit
e147b9eb91
|
@ -133,13 +133,13 @@ private:
|
|||
class LogManager
|
||||
{
|
||||
private:
|
||||
LogContainer* m_Log[LogTypes::NUMBER_OF_LOGS];
|
||||
Common::CriticalSection logMutex;
|
||||
FileLogListener *m_fileLog;
|
||||
ConsoleListener *m_consoleLog;
|
||||
static LogManager *m_logManager; // Singleton. Ugh.
|
||||
|
||||
public:
|
||||
LogContainer* m_Log[LogTypes::NUMBER_OF_LOGS];
|
||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||
|
||||
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
|
@ -153,6 +153,10 @@ public:
|
|||
m_Log[type]->setEnable(enable);
|
||||
}
|
||||
|
||||
bool isEnable(LogTypes::LOG_TYPE type) {
|
||||
return m_Log[type]->isEnable();
|
||||
}
|
||||
|
||||
const char *getShortName(LogTypes::LOG_TYPE type) const {
|
||||
return m_Log[type]->getShortName();
|
||||
}
|
||||
|
|
|
@ -372,12 +372,6 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _
|
|||
}
|
||||
#endif
|
||||
|
||||
std::string PathToFilename(std::string Path)
|
||||
{
|
||||
std::string Name, Ending;
|
||||
SplitPath(Path, 0, &Name, &Ending);
|
||||
return Name + Ending;
|
||||
}
|
||||
|
||||
void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename)
|
||||
{
|
||||
|
|
|
@ -74,8 +74,6 @@ int ChooseStringFrom(const char* str, const char* * items);
|
|||
|
||||
// "C:\Windows\winhelp.exe" to "C:\Windows\", "winhelp", "exe"
|
||||
bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _pFilename, std::string* _pExtension);
|
||||
// "C:\Windows\winhelp.exe" to "winhelp.exe"
|
||||
std::string PathToFilename(std::string Path);
|
||||
void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename);
|
||||
void NormalizeDirSep(std::string* str);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "VolumeCreator.h"
|
||||
#include "Filesystem.h"
|
||||
|
||||
#include "../../../Core/DebuggerWX/Src/FileMonitor.h"
|
||||
#include "../../DiscIO/Src/FileMonitor.h"
|
||||
|
||||
using namespace DVDInterface;
|
||||
|
||||
|
|
|
@ -787,14 +787,6 @@
|
|||
RelativePath=".\src\Debugger.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\FileMonitor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\FileMonitor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\JitWindow.cpp"
|
||||
>
|
||||
|
|
|
@ -11,7 +11,6 @@ files = [
|
|||
"BreakpointWindow.cpp",
|
||||
"CodeWindow.cpp",
|
||||
"CodeWindowFunctions.cpp",
|
||||
"FileMonitor.cpp",
|
||||
"MemoryCheckDlg.cpp",
|
||||
"MemoryWindow.cpp",
|
||||
"RegisterWindow.cpp",
|
||||
|
|
|
@ -648,6 +648,15 @@
|
|||
RelativePath=".\Src\VolumeDirectory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\FileMonitor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\FileMonitor.h"
|
||||
>
|
||||
</File>
|
||||
|
||||
<File
|
||||
RelativePath=".\Src\VolumeDirectory.h"
|
||||
>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "IniFile.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#include "PowerPC/PowerPc.h" // Core
|
||||
#include "ConfigManager.h"
|
||||
#include "../../DiscIO/Src/FileSystemGCWii.h"
|
||||
#include "../../DiscIO/Src/VolumeCreator.h"
|
||||
|
@ -97,7 +96,7 @@ void ReadGC(std::string FileName)
|
|||
void CheckFile(std::string File, int Size)
|
||||
{
|
||||
// Don't do anything if the log is unselected
|
||||
if (!LogManager::GetInstance()->m_Log[LogTypes::FILEMON]->isEnable()) return;
|
||||
if (!LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) return;
|
||||
// Do nothing if we found the same file again
|
||||
if (CurrentFile == File) return;
|
||||
|
||||
|
@ -124,8 +123,7 @@ void CheckFile(std::string File, int Size)
|
|||
void FindFilename(u64 offset)
|
||||
{
|
||||
// Don't do anything if the log is unselected
|
||||
if (!LogManager::GetInstance()->m_Log[LogTypes::FILEMON]->isEnable()) return;
|
||||
if (PowerPC::GetState() != PowerPC::CPUState::CPU_RUNNING) return;
|
||||
if (!LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) return;
|
||||
if (!FileAccess) return;
|
||||
|
||||
if (!pFileSystem || ISOFile != SConfig::GetInstance().m_LastFilename)
|
|
@ -20,6 +20,7 @@ files = [
|
|||
'VolumeGC.cpp',
|
||||
'VolumeWad.cpp',
|
||||
'VolumeWiiCrypted.cpp',
|
||||
'FileMonitor.cpp',
|
||||
'NANDContentLoader.cpp',
|
||||
'WiiWad.cpp',
|
||||
'AES/aes_cbc.c',
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "VolumeGC.h"
|
||||
#include "StringUtil.h"
|
||||
#include "../../../Core/DebuggerWX/Src/FileMonitor.h"
|
||||
#include "FileMonitor.h"
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue