Clear log whenever a new game is started.

Move log function definitions to the appropriate header file.
This commit is contained in:
spacy51 2007-12-27 15:40:21 +00:00
parent 48413a76e7
commit f170a8d96f
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 );
}
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();
}
}

View File

@ -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_)

View File

@ -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;
}

View File

@ -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()
{

View File

@ -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