diff --git a/src/win32/Logging.cpp b/src/win32/Logging.cpp index 5aa89308..7d8add3e 100644 --- a/src/win32/Logging.cpp +++ b/src/win32/Logging.cpp @@ -243,6 +243,11 @@ void Logging::log(const char *s) m_log.SetWindowText( text ); } +void Logging::clearLog() +{ + m_log.SetWindowText( "" ); +} + void Logging::OnClose() { EndDialog(FALSE); @@ -286,3 +291,10 @@ void toolsLog(const char *s) Logging::instance->log(str); } } + +void toolsClearLog() +{ + if( Logging::instance ) { + Logging::instance->clearLog(); + } +} diff --git a/src/win32/Logging.h b/src/win32/Logging.h index 01514f61..00ddadaa 100644 --- a/src/win32/Logging.h +++ b/src/win32/Logging.h @@ -36,6 +36,7 @@ class Logging : public ResizeDlg // Construction public: void log(const char *); + void clearLog(); Logging(CWnd* pParent = NULL); // standard constructor // Dialog Data @@ -95,4 +96,9 @@ class Logging : public ResizeDlg //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. +void toolsLogging(); +void toolsLog(const char *s); +void toolsClearLog(); + + #endif // !defined(AFX_LOGGING_H__222FC21A_D40D_450D_8A1C_D33305E47B85__INCLUDED_) diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index c14f9aee..a21e5c58 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -29,6 +29,7 @@ #include "FileDlg.h" #include "Reg.h" #include "WinResUtil.h" +#include "Logging.h" #include "../System.h" #include "../AutoBuild.h" @@ -666,6 +667,8 @@ bool MainWnd::FileRun() theApp.rewindCounter = 0; theApp.rewindSaveNeeded = false; + toolsClearLog(); + return true; } diff --git a/src/win32/MainWndTools.cpp b/src/win32/MainWndTools.cpp index 4134d63c..25528ea1 100644 --- a/src/win32/MainWndTools.cpp +++ b/src/win32/MainWndTools.cpp @@ -39,6 +39,7 @@ #include "TileView.h" #include "WavWriter.h" #include "WinResUtil.h" +#include "Logging.h" #include "../GBA.h" #include "../Globals.h" @@ -56,7 +57,6 @@ extern SOCKET remoteSocket; extern void remoteCleanUp(); extern void remoteSetSockets(SOCKET, SOCKET); -extern void toolsLogging(); void MainWnd::OnToolsDisassemble() { diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index 192b23ca..1a57fe1c 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -30,6 +30,7 @@ #include "skin.h" #include "WavWriter.h" #include "WinResUtil.h" +#include "Logging.h" #include "rpi.h" #include "../System.h" @@ -104,8 +105,6 @@ extern void MotionBlurIB(u8*,u32,int,int); extern void InterlaceIB(u8*,u32,int,int); extern void MotionBlurIB32(u8*,u32,int,int); -extern void toolsLog(const char *); - extern IDisplay *newGDIDisplay(); extern IDisplay *newDirectDrawDisplay(); #ifndef NO_OGL