git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@871 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
ad404dd582
commit
9152c67444
|
@ -3,6 +3,7 @@
|
|||
#include "MainWnd.h"
|
||||
|
||||
#include <winsock.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "FileDlg.h"
|
||||
#include "Reg.h"
|
||||
|
@ -48,6 +49,12 @@ MainWnd::~MainWnd()
|
|||
{
|
||||
}
|
||||
|
||||
bool MainWnd::fileExists( LPCTSTR lpFileName )
|
||||
{
|
||||
// check if file exists
|
||||
return GetFileAttributes( lpFileName ) != INVALID_FILE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
||||
//{{AFX_MSG_MAP(MainWnd)
|
||||
|
@ -1154,9 +1161,7 @@ void MainWnd::screenCapture(int captureNumber)
|
|||
captureNumber,
|
||||
ext);
|
||||
|
||||
// check if file exists
|
||||
DWORD dwAttr = GetFileAttributes( buffer );
|
||||
if( dwAttr != INVALID_FILE_ATTRIBUTES ) {
|
||||
if( fileExists( buffer ) ) {
|
||||
// screenshot file already exists
|
||||
screenCapture(++captureNumber);
|
||||
// this will recursively use the first non-existent screenshot number
|
||||
|
|
|
@ -30,6 +30,9 @@ public:
|
|||
void winSaveCheatList(const char *name);
|
||||
void winSaveCheatListDefault();
|
||||
|
||||
private:
|
||||
bool fileExists( LPCTSTR lpFileName );
|
||||
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
|
Loading…
Reference in New Issue