GUI: Added file monitor log
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4185 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
2b1022f152
commit
a69eb43019
|
@ -36,6 +36,7 @@ enum LOG_TYPE {
|
|||
COMMON,
|
||||
CONSOLE,
|
||||
DISCIO,
|
||||
FILEMON,
|
||||
DSPHLE,
|
||||
DSPLLE,
|
||||
DSP_MAIL,
|
||||
|
|
|
@ -34,6 +34,7 @@ LogManager::LogManager() : logMutex(1) {
|
|||
m_Log[LogTypes::BOOT] = new LogContainer("BOOT", "Boot");
|
||||
m_Log[LogTypes::COMMON] = new LogContainer("COMMON", "Common");
|
||||
m_Log[LogTypes::DISCIO] = new LogContainer("DIO", "Disc IO");
|
||||
m_Log[LogTypes::FILEMON] = new LogContainer("FileMon", "File Monitor");
|
||||
m_Log[LogTypes::PAD] = new LogContainer("PAD", "Pad");
|
||||
m_Log[LogTypes::PIXELENGINE] = new LogContainer("PE", "PixelEngine");
|
||||
m_Log[LogTypes::COMMANDPROCESSOR] = new LogContainer("CP", "CommandProc");
|
||||
|
@ -148,7 +149,7 @@ void LogContainer::removeListener(LogListener *listener) {
|
|||
|
||||
bool LogContainer::isListener(LogListener *listener) const {
|
||||
std::vector<LogListener *>::const_iterator i;
|
||||
for(i = listeners.begin(); i != listeners.end(); i++) {
|
||||
for (i = listeners.begin(); i != listeners.end(); i++) {
|
||||
if ((*i) == listener) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -439,23 +439,27 @@ int ChooseStringFrom(const char* str, const char* * items)
|
|||
}
|
||||
|
||||
|
||||
// Thousand separator. Turns 12345678 into 12,345,678.
|
||||
std::string ThS(int Integer, bool Unsigned)
|
||||
// Thousand separator. Turns 12345678 into 12,345,678
|
||||
std::string ThS(int Integer, bool Unsigned, int Spaces)
|
||||
{
|
||||
// Create storage space
|
||||
char cbuf[20];
|
||||
// Determine treatment of signed or unsigned
|
||||
if(Unsigned) sprintf(cbuf, "%u", Integer); else sprintf(cbuf, "%i", Integer);
|
||||
|
||||
std::string sbuf = cbuf;
|
||||
for (u32 i = 0; i < sbuf.length(); ++i)
|
||||
std::string Sbuf = cbuf;
|
||||
for (u32 i = 0; i < Sbuf.length(); ++i)
|
||||
{
|
||||
if((i & 3) == 3)
|
||||
{
|
||||
sbuf.insert(sbuf.length() - i, ",");
|
||||
Sbuf.insert(Sbuf.length() - i, ",");
|
||||
}
|
||||
}
|
||||
return sbuf;
|
||||
|
||||
// Spaces
|
||||
std::string Spc = "";
|
||||
for (int i = 0; i < (Spaces - Sbuf.length()); i++) Spc += " ";
|
||||
return Spc + Sbuf;
|
||||
}
|
||||
|
||||
void NormalizeDirSep(std::string* str)
|
||||
|
|
|
@ -50,8 +50,8 @@ inline void CharArrayFromFormat(char (& out)[Count], const char* format, ...)
|
|||
std::string StripSpaces(const std::string &s);
|
||||
std::string StripQuotes(const std::string &s);
|
||||
std::string StripNewline(const std::string &s);
|
||||
std::string ThS(int a, bool b = true); // thousand separator
|
||||
|
||||
// Thousand separator. Turns 12345678 into 12,345,678
|
||||
std::string ThS(int a, bool b = true, int Spaces = 0);
|
||||
|
||||
std::string StringFromInt(int value);
|
||||
std::string StringFromBool(bool value);
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
#include "../HW/CPU.h"
|
||||
#include "../HW/Memmap.h"
|
||||
#include "../Core.h"
|
||||
|
||||
#include "../VolumeHandler.h"
|
||||
|
||||
#include "VolumeCreator.h"
|
||||
#include "Filesystem.h"
|
||||
|
||||
#include "../../../Core/DebuggerWX/Src/FileMonitor.h"
|
||||
|
||||
using namespace DVDInterface;
|
||||
|
||||
|
||||
|
@ -217,6 +217,8 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
|||
{
|
||||
PanicAlert("Cant read from DVD_Plugin - DVD-Interface: Fatal Error");
|
||||
}
|
||||
|
||||
FileMon::CheckFile(std::string(pFilename), m_pFileSystem->GetFileSize(pFilename));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -787,6 +787,14 @@
|
|||
RelativePath=".\src\Debugger.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\FileMonitor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\FileMonitor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\JitWindow.cpp"
|
||||
>
|
||||
|
|
|
@ -464,7 +464,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
|||
interpreter->Check(!_LocalCoreStartupParameter.bUseJIT);
|
||||
pCoreMenu->AppendSeparator();
|
||||
|
||||
jitblocklinking = pCoreMenu->Append(IDM_JITBLOCKLINKING + 123, _T("&JIT Block Linking off"),
|
||||
jitblocklinking = pCoreMenu->Append(IDM_JITBLOCKLINKING, _T("&JIT Block Linking off"),
|
||||
_T("Provide safer execution by not linking the JIT blocks."),
|
||||
wxITEM_CHECK);
|
||||
|
||||
|
@ -755,7 +755,6 @@ void CCodeWindow::UpdateButtonStates()
|
|||
GetMenuBar()->Enable(IDM_SEARCHINSTRUCTION, Initialized);
|
||||
|
||||
GetMenuBar()->Enable(IDM_CLEARSYMBOLS, Initialized); // Symbols menu
|
||||
GetMenuBar()->Enable(IDM_CLEANSYMBOLS, Initialized); // not used
|
||||
GetMenuBar()->Enable(IDM_SCANFUNCTIONS, Initialized);
|
||||
GetMenuBar()->Enable(IDM_LOADMAPFILE, Initialized);
|
||||
GetMenuBar()->Enable(IDM_SAVEMAPFILE, Initialized);
|
||||
|
|
|
@ -11,6 +11,7 @@ files = [
|
|||
"BreakpointWindow.cpp",
|
||||
"CodeWindow.cpp",
|
||||
"CodeWindowFunctions.cpp",
|
||||
"FileMonitor.cpp",
|
||||
"MemoryCheckDlg.cpp",
|
||||
"MemoryWindow.cpp",
|
||||
"RegisterWindow.cpp",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "VolumeGC.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
#include "../../../Core/DebuggerWX/Src/FileMonitor.h"
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
|
@ -38,6 +38,8 @@ bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
|
|||
if (m_pReader == NULL)
|
||||
return false;
|
||||
|
||||
FileMon::FindFilename(_Offset);
|
||||
|
||||
return m_pReader->Read(_Offset, _Length, _pBuffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -281,8 +281,8 @@ int CFrame::GetNootebookAffiliation(wxString Name)
|
|||
}
|
||||
void CFrame::ClosePages()
|
||||
{
|
||||
DoToggleWindow(IDM_LOGWINDOW, false);
|
||||
DoToggleWindow(IDM_CONSOLEWINDOW, false);
|
||||
//DoToggleWindow(IDM_LOGWINDOW, false);
|
||||
//DoToggleWindow(IDM_CONSOLEWINDOW, false);
|
||||
DoToggleWindow(IDM_CODEWINDOW, false);
|
||||
DoToggleWindow(IDM_REGISTERWINDOW, false);
|
||||
DoToggleWindow(IDM_BREAKPOINTWINDOW, false);
|
||||
|
|
|
@ -437,10 +437,14 @@ void CLogWindow::OnLogTimer(wxTimerEvent& WXUNUSED(event))
|
|||
if (!m_LogAccess) return;
|
||||
|
||||
//m_Log->Freeze();
|
||||
int MsgSz = msgQueue.size();
|
||||
UpdateLog();
|
||||
// Better auto scroll
|
||||
m_Log->ScrollLines(1);
|
||||
m_Log->ShowPosition( m_Log->GetLastPosition() );
|
||||
if (MsgSz > 0)
|
||||
{
|
||||
m_Log->ScrollLines(1);
|
||||
m_Log->ShowPosition( m_Log->GetLastPosition() );
|
||||
}
|
||||
//m_Log->Thaw();
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
#include "BootManager.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Main window
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
IMPLEMENT_APP(DolphinApp)
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
|
@ -345,9 +348,13 @@ void DolphinApp::OnEndSession()
|
|||
{
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
/////////////////////////////////////// Main window created
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Talk to GUI
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
// g_VideoInitialize.pSysMessage() goes here
|
||||
void Host_SysMessage(const char *fmt, ...)
|
||||
{
|
||||
|
@ -363,10 +370,6 @@ void Host_SysMessage(const char *fmt, ...)
|
|||
PanicAlert("%s", msg);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Talk to GUI
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
#if defined HAVE_WX && HAVE_WX
|
||||
bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*/)
|
||||
{
|
||||
|
@ -521,7 +524,7 @@ void Host_UpdateStatusBar(const char* _pText, int Field)
|
|||
event.StopPropagation();
|
||||
wxPostEvent(main_frame, event);
|
||||
// Process the event before continue
|
||||
wxYieldIfNeeded();
|
||||
wxGetApp().ProcessPendingEvents();
|
||||
}
|
||||
|
||||
void Host_SetWiiMoteConnectionState(int _State)
|
||||
|
|
Loading…
Reference in New Issue