Clear log whenever a new game is started.

Move log function definitions to the appropriate header file.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@244 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2007-12-27 15:40:21 +00:00
parent 3d7cd89633
commit 153d35246a
5 changed files with 23 additions and 3 deletions

View File

@ -243,6 +243,11 @@ void Logging::log(const char *s)
m_log.SetWindowText( text ); m_log.SetWindowText( text );
} }
void Logging::clearLog()
{
m_log.SetWindowText( "" );
}
void Logging::OnClose() void Logging::OnClose()
{ {
EndDialog(FALSE); EndDialog(FALSE);
@ -286,3 +291,10 @@ void toolsLog(const char *s)
Logging::instance->log(str); Logging::instance->log(str);
} }
} }
void toolsClearLog()
{
if( Logging::instance ) {
Logging::instance->clearLog();
}
}

View File

@ -36,6 +36,7 @@ class Logging : public ResizeDlg
// Construction // Construction
public: public:
void log(const char *); void log(const char *);
void clearLog();
Logging(CWnd* pParent = NULL); // standard constructor Logging(CWnd* pParent = NULL); // standard constructor
// Dialog Data // Dialog Data
@ -95,4 +96,9 @@ class Logging : public ResizeDlg
//{{AFX_INSERT_LOCATION}} //{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. // 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_) #endif // !defined(AFX_LOGGING_H__222FC21A_D40D_450D_8A1C_D33305E47B85__INCLUDED_)

View File

@ -29,6 +29,7 @@
#include "FileDlg.h" #include "FileDlg.h"
#include "Reg.h" #include "Reg.h"
#include "WinResUtil.h" #include "WinResUtil.h"
#include "Logging.h"
#include "../System.h" #include "../System.h"
#include "../AutoBuild.h" #include "../AutoBuild.h"
@ -666,6 +667,8 @@ bool MainWnd::FileRun()
theApp.rewindCounter = 0; theApp.rewindCounter = 0;
theApp.rewindSaveNeeded = false; theApp.rewindSaveNeeded = false;
toolsClearLog();
return true; return true;
} }

View File

@ -39,6 +39,7 @@
#include "TileView.h" #include "TileView.h"
#include "WavWriter.h" #include "WavWriter.h"
#include "WinResUtil.h" #include "WinResUtil.h"
#include "Logging.h"
#include "../GBA.h" #include "../GBA.h"
#include "../Globals.h" #include "../Globals.h"
@ -56,7 +57,6 @@ extern SOCKET remoteSocket;
extern void remoteCleanUp(); extern void remoteCleanUp();
extern void remoteSetSockets(SOCKET, SOCKET); extern void remoteSetSockets(SOCKET, SOCKET);
extern void toolsLogging();
void MainWnd::OnToolsDisassemble() void MainWnd::OnToolsDisassemble()
{ {

View File

@ -30,6 +30,7 @@
#include "skin.h" #include "skin.h"
#include "WavWriter.h" #include "WavWriter.h"
#include "WinResUtil.h" #include "WinResUtil.h"
#include "Logging.h"
#include "rpi.h" #include "rpi.h"
#include "../System.h" #include "../System.h"
@ -104,8 +105,6 @@ extern void MotionBlurIB(u8*,u32,int,int);
extern void InterlaceIB(u8*,u32,int,int); extern void InterlaceIB(u8*,u32,int,int);
extern void MotionBlurIB32(u8*,u32,int,int); extern void MotionBlurIB32(u8*,u32,int,int);
extern void toolsLog(const char *);
extern IDisplay *newGDIDisplay(); extern IDisplay *newGDIDisplay();
extern IDisplay *newDirectDrawDisplay(); extern IDisplay *newDirectDrawDisplay();
#ifndef NO_OGL #ifndef NO_OGL