From 4723cc7407f5439a9fb9dc08122e6a6d7f9611fd Mon Sep 17 00:00:00 2001 From: zilmar Date: Fri, 14 May 2010 23:28:15 +0000 Subject: [PATCH] git-svn-id: https://localhost/svn/Project64/trunk@22 111125ac-702d-7242-af9c-5ba8ae61c1ef --- Project64.dsw | 15 +++ Source/7zip/7zip.dsp | 2 +- Source/Common/Common.dsp | 19 ++- Source/Common/Common.plg | 53 +-------- Source/Common/File Class.cpp | 3 +- Source/Common/Log Class.cpp | 12 +- Source/Common/Log Class.h | 10 +- Source/Common/stdafx.cpp | 2 +- Source/PjDirValidation/PjDirValidation.dsp | 110 ++++++++++++++++++ Source/PjDirValidation/main.cpp | 6 + .../C Core/{CPU Log.c => CPU Log.cpp} | 8 +- .../C Core/{Logging.c => Logging.cpp} | 22 ++-- Source/Project64/N64 System/C Core/Pif.cpp | 15 +-- Source/Project64/N64 System/Cheat Class.cpp | 69 ++++++++++- Source/Project64/N64 System/Cheat Class.h | 1 + Source/Project64/Project64.dsp | 4 +- Source/Project64/Settings.h | 1 + .../SettingType/SettingsType-Application.cpp | 25 +++- .../SettingType/SettingsType-Cheats.cpp | 11 +- .../SettingType/SettingsType-Cheats.h | 18 +-- .../SettingsType-GameSettingIndex.cpp | 6 +- Source/Project64/Settings/Settings Class.cpp | 20 ++-- .../Project64/User Interface/UI Resources.aps | Bin 309452 -> 284292 bytes .../Project64/User Interface/UI Resources.rc | 6 +- Source/Project64/main.cpp | 81 ++++++++++++- 25 files changed, 387 insertions(+), 132 deletions(-) create mode 100644 Source/PjDirValidation/PjDirValidation.dsp create mode 100644 Source/PjDirValidation/main.cpp rename Source/Project64/N64 System/C Core/{CPU Log.c => CPU Log.cpp} (82%) rename Source/Project64/N64 System/C Core/{Logging.c => Logging.cpp} (96%) diff --git a/Project64.dsw b/Project64.dsw index 634945846..3b0dcb394 100644 --- a/Project64.dsw +++ b/Project64.dsw @@ -27,6 +27,21 @@ Package=<4> ############################################################################### +Project: "PjDirValidation"=".\SOURCE\PjDirValidation\PjDirValidation.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name Common + End Project Dependency +}}} + +############################################################################### + Project: "Project64"=".\Source\Project64\Project64.dsp" - Package Owner=<4> Package=<5> diff --git a/Source/7zip/7zip.dsp b/Source/7zip/7zip.dsp index eaf48ebd7..666cf0348 100644 --- a/Source/7zip/7zip.dsp +++ b/Source/7zip/7zip.dsp @@ -61,7 +61,7 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../Bin/Debug" +# PROP Output_Dir "../../Build/7zip/Debug" # PROP Intermediate_Dir "../../Build/7zip/Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c diff --git a/Source/Common/Common.dsp b/Source/Common/Common.dsp index a06d4e80c..9d9380e0f 100644 --- a/Source/Common/Common.dsp +++ b/Source/Common/Common.dsp @@ -61,11 +61,11 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../Bin/Debug" +# PROP Output_Dir "../../Build/Common/Debug" # PROP Intermediate_Dir "../../Build/Common/Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /Yu"stdafx.h" /FD /GZ /c # ADD BASE RSC /l 0xc09 /d "_DEBUG" # ADD RSC /l 0xc09 /d "_DEBUG" BSC32=bscmake.exe @@ -114,6 +114,10 @@ SOURCE=".\File Class.cpp" # End Source File # Begin Source File +SOURCE=".\Ini File Class.cpp" +# End Source File +# Begin Source File + SOURCE=".\Log Class.cpp" # End Source File # Begin Source File @@ -143,6 +147,17 @@ SOURCE=".\std string.cpp" # Begin Source File SOURCE=.\stdafx.cpp + +!IF "$(CFG)" == "Common - Win32 Release" + +!ELSEIF "$(CFG)" == "Common - Win32 Debug" + +# ADD CPP /Yc"stdafx.h" + +!ELSEIF "$(CFG)" == "Common - Win32 External Release" + +!ENDIF + # End Source File # Begin Source File diff --git a/Source/Common/Common.plg b/Source/Common/Common.plg index 47c4bc949..127701df7 100644 --- a/Source/Common/Common.plg +++ b/Source/Common/Common.plg @@ -6,45 +6,12 @@ --------------------Configuration: Common - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP43E.tmp" with contents -[ -/nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /Fp"../../Build/Common/Debug/Common.pch" /Yu"stdafx.h" /Fo"../../Build/Common/Debug/" /Fd"../../Build/Common/Debug/" /FD /GZ /c -"D:\My Programs\Emulation\Project64\SOURCE\Common\File Class.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\Log Class.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\md5.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\MemTest.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\osversion.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\path.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\registry.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\std string.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\Trace.cpp" -"D:\My Programs\Emulation\Project64\SOURCE\Common\Version.cpp" -"D:\My Programs\Emulation\Project64\Source\Common\Ini File Class.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP43E.tmp" -Creating temporary file "C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP43F.tmp" with contents +Creating temporary file "C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP60.tmp" with contents [ /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /Fp"../../Build/Common/Debug/Common.pch" /Yc"stdafx.h" /Fo"../../Build/Common/Debug/" /Fd"../../Build/Common/Debug/" /FD /GZ /c "D:\My Programs\Emulation\Project64\SOURCE\Common\stdafx.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP43F.tmp" -Creating temporary file "C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP440.tmp" with contents -[ -/nologo /out:"../../Bin/Debug\Common.lib" -"\My Programs\Emulation\Project64\Build\Common\Debug\File Class.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\Log Class.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\md5.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\MemTest.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\osversion.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\path.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\registry.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\std string.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\stdafx.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\Trace.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\Version.obj" -"\My Programs\Emulation\Project64\Build\Common\Debug\Ini File Class.obj" -] -Creating command line "link.exe -lib @C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP440.tmp" +Creating command line "cl.exe @C:\DOCUME~1\NICHOL~1\LOCALS~1\Temp\RSP60.tmp"

Output Window

Compiling... stdafx.cpp @@ -62,25 +29,11 @@ warning C4786: 'std::_Tree,std::al warning C4786: 'std::map,std::allocator >,std::basic_string,std::allocator >,std::less,std::allocator > >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information warning C4786: 'std::map,std::allocator >,std::basic_string,std::allocator >,std::less,std::allocator > >,std::allocator,std::allocator > > >::value_compare' : identifier was truncated to '255' characters in the debug information warning C4786: 'std::map,std::allocator >,std::basic_string,std::allocator >,std::less,std::allocator > >,std::allocator,std::allocator > > >::_Kfn' : identifier was truncated to '255' characters in the debug information -Compiling... -File Class.cpp -Log Class.cpp -md5.cpp -MemTest.cpp -osversion.cpp -path.cpp -registry.cpp -std string.cpp -Trace.cpp -Version.cpp -Ini File Class.cpp -Generating Code... -Creating library...

Results

-Common.lib - 0 error(s), 14 warning(s) +stdafx.obj - 0 error(s), 14 warning(s) diff --git a/Source/Common/File Class.cpp b/Source/Common/File Class.cpp index 43dfb7211..e0dfc358c 100644 --- a/Source/Common/File Class.cpp +++ b/Source/Common/File Class.cpp @@ -15,7 +15,6 @@ CFile::CFile(HANDLE hFile) : { ATLASSERT(hFile != 0); } - } CFile::~CFile() @@ -26,7 +25,7 @@ CFile::~CFile() } } -CFile::CFile(LPCTSTR lpszFileName, DWORD nOpenFlags) : +CFile::CFile(LPCTSTR lpszFileName, ULONG nOpenFlags) : m_hFile(INVALID_HANDLE_VALUE), m_bCloseOnDelete(true) { diff --git a/Source/Common/Log Class.cpp b/Source/Common/Log Class.cpp index 15d036e64..714a1e012 100644 --- a/Source/Common/Log Class.cpp +++ b/Source/Common/Log Class.cpp @@ -32,13 +32,14 @@ bool CLog::Open( LPCTSTR FileName, LOG_OPEN_MODE mode /* = Log_New */) m_hLogFile.Close(); } - DWORD nOpenFlags = CFile::modeReadWrite | CFile::modeCreate; + ULONG nOpenFlags = CFile::modeReadWrite | CFile::modeCreate; if (mode == Log_Append) { nOpenFlags |= CFile::modeNoTruncate; } if (!m_hLogFile.Open(File, nOpenFlags)) { return false; } + m_FileName = (LPCTSTR)File; m_hLogFile.Seek(0,mode == Log_Append ? CFile::end : CFile::begin); #ifdef _UNICODE @@ -46,7 +47,6 @@ bool CLog::Open( LPCTSTR FileName, LOG_OPEN_MODE mode /* = Log_New */) if(m_hLogFile.GetLength()==0) { WORD wUNICODE = 0xFEFF; - DWORD dwWriten=0; m_hLogFile.Write(&wUNICODE, 2); } @@ -118,7 +118,7 @@ void CLog::LogArgs(LPCTSTR Message, va_list & args ) void CLog::Log( LPCTSTR Message ) { if (!m_hLogFile.IsOpen()) { return; } - m_hLogFile.Write(Message,(DWORD)_tcslen(Message)*sizeof(TCHAR)); + m_hLogFile.Write(Message,(ULONG)_tcslen(Message)*sizeof(TCHAR)); if (m_FlushOnWrite) { m_hLogFile.Flush(); @@ -127,7 +127,7 @@ void CLog::Log( LPCTSTR Message ) if (m_TruncateFileLog) { // check file size - DWORD FileSize = m_hLogFile.GetLength(); + ULONG FileSize = m_hLogFile.GetLength(); // if larger then max size then if (FileSize > m_MaxFileSize) { @@ -194,8 +194,8 @@ void CLog::Log( LPCTSTR Message ) } while (SizeToRead > 0); //clean up - m_hLogFile.SetEndOfFile(); - m_hLogFile.Flush(); + m_hLogFile.SetEndOfFile(); + m_hLogFile.Flush(); } // end if } } diff --git a/Source/Common/Log Class.h b/Source/Common/Log Class.h index 44437ed35..1ba18d229 100644 --- a/Source/Common/Log Class.h +++ b/Source/Common/Log Class.h @@ -13,8 +13,8 @@ class CLog { bool m_FlushOnWrite; stdstr m_FileName; bool m_TruncateFileLog; - DWORD m_MaxFileSize; - DWORD m_FileChangeSize; + ULONG m_MaxFileSize; + ULONG m_FileChangeSize; public: CLog ( void ); @@ -28,16 +28,16 @@ public: void Reset ( void ); void Close ( void ); - inline void SetMaxFileSize ( DWORD Size ) + inline void SetMaxFileSize ( ULONG Size ) { m_MaxFileSize = Size; - m_FileChangeSize = (DWORD)(Size * 0.1); + m_FileChangeSize = (ULONG)(Size * 0.1); } inline void SetTruncateFile( bool Truncate ) { m_TruncateFileLog = Truncate; } inline void SetFlush ( bool Always ) { m_FlushOnWrite = Always; } inline bool IsOpen ( void ) const { return m_hLogFile.IsOpen(); } inline bool Flush ( void ) { return m_hLogFile.Flush(); } - inline stdstr FileName ( void ) const { return m_FileName; } + inline const stdstr & FileName ( void ) const { return m_FileName; } }; #endif diff --git a/Source/Common/stdafx.cpp b/Source/Common/stdafx.cpp index 303e93800..71d3a37f4 100644 --- a/Source/Common/stdafx.cpp +++ b/Source/Common/stdafx.cpp @@ -1,3 +1,3 @@ -#pragma warning (disable : 4786) +#pragma warning(disable:4786) #include "stdafx.h" \ No newline at end of file diff --git a/Source/PjDirValidation/PjDirValidation.dsp b/Source/PjDirValidation/PjDirValidation.dsp new file mode 100644 index 000000000..50363e766 --- /dev/null +++ b/Source/PjDirValidation/PjDirValidation.dsp @@ -0,0 +1,110 @@ +# Microsoft Developer Studio Project File - Name="PjDirValidation" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PjDirValidation - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PjDirValidation.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PjDirValidation.mak" CFG="PjDirValidation - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PjDirValidation - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PjDirValidation - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PjDirValidation - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../Bin/Release" +# PROP Intermediate_Dir "../../Build/PjDirValidation/Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /I "./" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "NDEBUG" +# ADD RSC /l 0xc09 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 + +!ELSEIF "$(CFG)" == "PjDirValidation - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../Bin/Debug" +# PROP Intermediate_Dir "../../Build/PjDirValidation/Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../" /I "./" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc09 /d "_DEBUG" +# ADD RSC /l 0xc09 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# SUBTRACT LINK32 /map + +!ENDIF + +# Begin Target + +# Name "PjDirValidation - Win32 Release" +# Name "PjDirValidation - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/Source/PjDirValidation/main.cpp b/Source/PjDirValidation/main.cpp new file mode 100644 index 000000000..2f54344d1 --- /dev/null +++ b/Source/PjDirValidation/main.cpp @@ -0,0 +1,6 @@ +#include + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszArgs, int nWinMode) +{ + return 0; +} diff --git a/Source/Project64/N64 System/C Core/CPU Log.c b/Source/Project64/N64 System/C Core/CPU Log.cpp similarity index 82% rename from Source/Project64/N64 System/C Core/CPU Log.c rename to Source/Project64/N64 System/C Core/CPU Log.cpp index 6c389691a..9854b5577 100644 --- a/Source/Project64/N64 System/C Core/CPU Log.c +++ b/Source/Project64/N64 System/C Core/CPU Log.cpp @@ -54,12 +54,10 @@ void CPU_Message (char * Message, ...) { } void Start_x86_Log (void) { - char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR]; - char fname[_MAX_FNAME],ext[_MAX_EXT], LogFileName[_MAX_PATH]; - GetModuleFileName(NULL,path_buffer,sizeof(path_buffer)); - _splitpath( path_buffer, drive, dir, fname, ext ); - _makepath( LogFileName, drive, dir, "CPUoutput", "log" ); + CPath LogFileName(CPath::MODULE_DIRECTORY); + LogFileName.AppendDirectory("Logs"); + LogFileName.SetNameExtension(_T("CPUoutput.log")); if (hCPULogFile) { Stop_x86_Log(); } hCPULogFile = CreateFile(LogFileName,GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,NULL, diff --git a/Source/Project64/N64 System/C Core/Logging.c b/Source/Project64/N64 System/C Core/Logging.cpp similarity index 96% rename from Source/Project64/N64 System/C Core/Logging.c rename to Source/Project64/N64 System/C Core/Logging.cpp index 611f32950..edec59db6 100644 --- a/Source/Project64/N64 System/C Core/Logging.c +++ b/Source/Project64/N64 System/C Core/Logging.cpp @@ -51,7 +51,7 @@ void EnterLogOptions(HWND hwndOwner) { psp[0].dwFlags = PSP_USETITLE; psp[0].hInstance = GetModuleHandle(NULL); psp[0].pszTemplate = MAKEINTRESOURCE(IDD_Logging_Registers); - psp[0].pfnDlgProc = LogRegProc; + psp[0].pfnDlgProc = (DLGPROC)LogRegProc; psp[0].pszTitle = "Registers"; psp[0].lParam = 0; psp[0].pfnCallback = NULL; @@ -60,7 +60,7 @@ void EnterLogOptions(HWND hwndOwner) { psp[1].dwFlags = PSP_USETITLE; psp[1].hInstance = GetModuleHandle(NULL); psp[1].pszTemplate = MAKEINTRESOURCE(IDD_Logging_PifRam); - psp[1].pfnDlgProc = LogPifProc; + psp[1].pfnDlgProc = (DLGPROC)LogPifProc; psp[1].pszTitle = "Pif Ram"; psp[1].lParam = 0; psp[1].pfnCallback = NULL; @@ -69,7 +69,7 @@ void EnterLogOptions(HWND hwndOwner) { psp[2].dwFlags = PSP_USETITLE; psp[2].hInstance = GetModuleHandle(NULL); psp[2].pszTemplate = MAKEINTRESOURCE(IDD_Logging_General); - psp[2].pfnDlgProc = LogGeneralProc; + psp[2].pfnDlgProc = (DLGPROC)LogGeneralProc; psp[2].pszTitle = "General"; psp[2].lParam = 0; psp[2].pfnCallback = NULL; @@ -701,21 +701,19 @@ void SaveLogOptions (void) { RegCloseKey(hKeyResults); } -void StartLog (void) { - char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR]; - char fname[_MAX_FNAME],ext[_MAX_EXT],File[255]; - +void StartLog (void) +{ if (!LogOptions.GenerateLog) { StopLog(); return; } if (hLogFile) { return; } - GetModuleFileName(NULL,path_buffer,sizeof(path_buffer)); - _splitpath( path_buffer, drive, dir, fname, ext ); - sprintf(File,"%s%s\\cpudebug.log",drive,dir); - - hLogFile = CreateFile(File,GENERIC_WRITE, FILE_SHARE_READ,NULL,CREATE_ALWAYS, + CPath LogFile(CPath::MODULE_DIRECTORY); + LogFile.AppendDirectory(_T("Logs")); + LogFile.SetNameExtension(_T("cpudebug.log")); + + hLogFile = CreateFile(LogFile,GENERIC_WRITE, FILE_SHARE_READ,NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); SetFilePointer(hLogFile,0,NULL,FILE_BEGIN); } diff --git a/Source/Project64/N64 System/C Core/Pif.cpp b/Source/Project64/N64 System/C Core/Pif.cpp index 1f3ef5e0c..08d9290a4 100644 --- a/Source/Project64/N64 System/C Core/Pif.cpp +++ b/Source/Project64/N64 System/C Core/Pif.cpp @@ -97,21 +97,12 @@ void LogControllerPakData (char * Description) { int MaxPif2Cmds = 300; unsigned __int64 * Pif2Reply[4]; -char * GetPif2FileName(void) { - char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR]; - char fname[_MAX_FNAME],ext[_MAX_EXT]; - static char IniFileName[_MAX_PATH]; - - GetModuleFileName(NULL,path_buffer,sizeof(path_buffer)); - _splitpath( path_buffer, drive, dir, fname, ext ); - sprintf(IniFileName,"%s%s%s",drive,dir,"pif2.dat"); - return IniFileName; -} - BOOLEAN pif2valid = FALSE; void LoadPIF2 () { - FILE *pif2db = fopen (GetPif2FileName(), "rt"); + CPath Pif2FileName(CPath::MODULE_DIRECTORY,"pif2.dat"); + + FILE *pif2db = fopen (Pif2FileName, "rt"); // unsigned __int64 p1, p2, r1, r2; char buff[255]; int cnt = 0; diff --git a/Source/Project64/N64 System/Cheat Class.cpp b/Source/Project64/N64 System/Cheat Class.cpp index 612d2e8bf..99d1c9b1c 100644 --- a/Source/Project64/N64 System/Cheat Class.cpp +++ b/Source/Project64/N64 System/Cheat Class.cpp @@ -4,6 +4,8 @@ #include #include +#include "Settings/SettingType/SettingsType-Cheats.h" + enum { WM_EDITCHEAT = WM_USER + 0x120 }; enum { UM_CHANGECODEEXTENSION = WM_USER + 0x121 }; @@ -780,6 +782,7 @@ int CALLBACK CCheats::CheatAddProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DWO _Settings->SaveStringIndex(Cheat_Notes, _this->m_EditCheat,GetDlgItemStr(hDlg,IDC_NOTES)); _Settings->SaveStringIndex(Cheat_Options, _this->m_EditCheat,Options); _this->RecordCheatValues(hDlg); + CSettingTypeCheats::FlushChanges(); _this->RefreshCheatManager(); } break; @@ -954,7 +957,7 @@ int CALLBACK CCheats::CheatListProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DW TreeView_GetItem((HWND)_this->m_hCheatTree,&item); _this->ChangeChildrenStatus((WND_HANDLE)TVI_ROOT,false); -// _this->DeleteCheat(item.lParam); + _this->DeleteCheat(item.lParam); _this->RefreshCheatManager(); } break; @@ -1534,6 +1537,70 @@ void CCheats::MenuSetText ( MENU_HANDLE hMenu, int MenuPos, const char * Title, SetMenuItemInfo((HMENU)hMenu,MenuPos,true,&MenuInfo); } +void CCheats::DeleteCheat(int Index) +{ + for (int CheatNo = Index; CheatNo < MaxCheats; CheatNo ++ ) + { + stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,CheatNo + 1); + if (LineEntry.empty()) + { + _Settings->DeleteSettingIndex(Cheat_RangeNotes,CheatNo); + _Settings->DeleteSettingIndex(Cheat_Range,CheatNo); + _Settings->DeleteSettingIndex(Cheat_Options,CheatNo); + _Settings->DeleteSettingIndex(Cheat_Notes,CheatNo); + _Settings->DeleteSettingIndex(Cheat_Extension,CheatNo); + _Settings->DeleteSettingIndex(Cheat_Entry,CheatNo); + _Settings->DeleteSettingIndex(Cheat_Active,CheatNo); + break; + } + stdstr Value; + if (_Settings->LoadStringIndex(Cheat_RangeNotes,CheatNo+1,Value)) + { + _Settings->SaveStringIndex(Cheat_RangeNotes,CheatNo, Value); + } else { + _Settings->DeleteSettingIndex(Cheat_RangeNotes,CheatNo); + } + + if (_Settings->LoadStringIndex(Cheat_Range,CheatNo+1,Value)) + { + _Settings->SaveStringIndex(Cheat_Range,CheatNo, Value); + } else { + _Settings->DeleteSettingIndex(Cheat_Range,CheatNo); + } + + if (_Settings->LoadStringIndex(Cheat_Options,CheatNo+1,Value)) + { + _Settings->SaveStringIndex(Cheat_Options,CheatNo, Value); + } else { + _Settings->DeleteSettingIndex(Cheat_Options,CheatNo); + } + + if (_Settings->LoadStringIndex(Cheat_Notes,CheatNo+1,Value)) + { + _Settings->SaveStringIndex(Cheat_Notes,CheatNo, Value); + } else { + _Settings->DeleteSettingIndex(Cheat_Notes,CheatNo); + } + + if (_Settings->LoadStringIndex(Cheat_Extension,CheatNo+1,Value)) + { + _Settings->SaveStringIndex(Cheat_Extension,CheatNo, Value); + } else { + _Settings->DeleteSettingIndex(Cheat_Extension,CheatNo); + } + + bool bValue; + if (_Settings->LoadBoolIndex(Cheat_Active,CheatNo+1,bValue)) + { + _Settings->SaveBoolIndex(Cheat_Active,CheatNo, bValue); + } else { + _Settings->DeleteSettingIndex(Cheat_Active,CheatNo); + } + _Settings->SaveStringIndex(Cheat_Entry,CheatNo, LineEntry); + } + CSettingTypeCheats::FlushChanges(); +} + void CCheats::ChangeChildrenStatus(WND_HANDLE hParent, bool Checked) { HTREEITEM hItem = TreeView_GetChild((HWND)m_hCheatTree, hParent); if (hItem == NULL) { diff --git a/Source/Project64/N64 System/Cheat Class.h b/Source/Project64/N64 System/Cheat Class.h index 807e01023..e790053ca 100644 --- a/Source/Project64/N64 System/Cheat Class.h +++ b/Source/Project64/N64 System/Cheat Class.h @@ -50,6 +50,7 @@ class CCheats { void RecordCheatValues ( WND_HANDLE hDlg ); bool CheatChanged ( WND_HANDLE hDlg ); bool IsValid16BitCode ( LPCSTR CheatString ) const; + void DeleteCheat(int Index); //Get Information about the Cheat stdstr GetCheatName ( int CheatNo, bool AddExtension ) const; diff --git a/Source/Project64/Project64.dsp b/Source/Project64/Project64.dsp index 1eaa3d2ab..726da02b6 100644 --- a/Source/Project64/Project64.dsp +++ b/Source/Project64/Project64.dsp @@ -386,7 +386,7 @@ SOURCE="N64 System\C Core\C Memory.cpp" # End Source File # Begin Source File -SOURCE="N64 System\C Core\CPU Log.c" +SOURCE=".\N64 System\C Core\CPU Log.cpp" # End Source File # Begin Source File @@ -418,7 +418,7 @@ SOURCE="N64 System\C Core\Interpreter Ops.c" # End Source File # Begin Source File -SOURCE="N64 System\C Core\Logging.c" +SOURCE=".\N64 System\C Core\Logging.cpp" # End Source File # Begin Source File diff --git a/Source/Project64/Settings.h b/Source/Project64/Settings.h index ca0a2ae38..13e233ff2 100644 --- a/Source/Project64/Settings.h +++ b/Source/Project64/Settings.h @@ -13,6 +13,7 @@ enum SettingID { //Support Files SupportFile_Settings, + SupportFile_SettingsDefault, SupportFile_RomDatabase, SupportFile_Cheats, SupportFile_Notes, diff --git a/Source/Project64/Settings/SettingType/SettingsType-Application.cpp b/Source/Project64/Settings/SettingType/SettingsType-Application.cpp index ac81d89ae..5791392f1 100644 --- a/Source/Project64/Settings/SettingType/SettingsType-Application.cpp +++ b/Source/Project64/Settings/SettingType/SettingsType-Application.cpp @@ -52,7 +52,23 @@ CSettingTypeApplication::~CSettingTypeApplication() void CSettingTypeApplication::Initilize( const char * AppName ) { - m_SettingsIniFile = new CIniFile(_Settings->LoadString(SupportFile_Settings).c_str()); + stdstr SettingsFile, OrigSettingsFile; + + for (int i = 0; i < 100; i++) + { + OrigSettingsFile = SettingsFile; + SettingsFile = _Settings->LoadString(SupportFile_Settings); + if (SettingsFile == OrigSettingsFile) + { + break; + } + if (m_SettingsIniFile) + { + delete m_SettingsIniFile; + } + m_SettingsIniFile = new CIniFile(SettingsFile.c_str()); + } while (SettingsFile != OrigSettingsFile); + m_SettingsIniFile->SetAutoFlush(false); m_UseRegistry = _Settings->LoadBool(Setting_UseFromRegistry); } @@ -127,7 +143,12 @@ bool CSettingTypeApplication::Load ( int Index, stdstr & Value ) const bool bRes; if (!m_UseRegistry) { - bRes = m_SettingsIniFile->GetString(SectionName(),m_KeyNameIdex.c_str(),m_DefaultStr,Value); + if (m_SettingsIniFile) + { + bRes = m_SettingsIniFile->GetString(SectionName(),m_KeyNameIdex.c_str(),m_DefaultStr,Value); + } else { + bRes = false; + } } else { Notify().BreakPoint(__FILE__,__LINE__); } diff --git a/Source/Project64/Settings/SettingType/SettingsType-Cheats.cpp b/Source/Project64/Settings/SettingType/SettingsType-Cheats.cpp index c2a1e8867..9ebf64727 100644 --- a/Source/Project64/Settings/SettingType/SettingsType-Cheats.cpp +++ b/Source/Project64/Settings/SettingType/SettingsType-Cheats.cpp @@ -29,6 +29,14 @@ void CSettingTypeCheats::CleanUp ( void ) } } +void CSettingTypeCheats::FlushChanges( void ) +{ + if (m_CheatIniFile) + { + m_CheatIniFile->FlushChanges(); + } +} + void CSettingTypeCheats::GameChanged ( void * /*Data */ ) { m_SectionIdent = _Settings->LoadString(Game_IniKey); @@ -116,5 +124,6 @@ void CSettingTypeCheats::Save ( int Index, const char * Value ) void CSettingTypeCheats::Delete ( int Index ) { - Notify().BreakPoint(__FILE__,__LINE__); + stdstr_f Key("Cheat%d%s",Index,m_PostFix); + m_CheatIniFile->SaveString(m_SectionIdent.c_str(),Key.c_str(),NULL); } diff --git a/Source/Project64/Settings/SettingType/SettingsType-Cheats.h b/Source/Project64/Settings/SettingType/SettingsType-Cheats.h index c8ea134f4..081d1d32b 100644 --- a/Source/Project64/Settings/SettingType/SettingsType-Cheats.h +++ b/Source/Project64/Settings/SettingType/SettingsType-Cheats.h @@ -8,18 +8,6 @@ protected: static CIniFile * m_CheatIniFile; static stdstr m_SectionIdent; const LPCSTR m_PostFix; -/* const LPCSTR m_DefaultStr; - const DWORD m_DefaultValue; - const SettingID m_DefaultSetting; - - stdstr FixSectionName (LPCSTR Section); - - static CIniFile * m_SettingsIniFile; - static bool m_UseRegistry; - const stdstr m_Section; - const stdstr m_KeyName; - - virtual LPCSTR SectionName ( void ) const;*/ static void GameChanged ( void * /*Data */ ); public: @@ -49,7 +37,9 @@ public: virtual void Delete ( int Index ); // Initilize this class to use ini or registry - static void Initilize ( void ); - static void CleanUp ( void ); + static void Initilize ( void ); + static void CleanUp ( void ); + static void FlushChanges ( void ); + }; diff --git a/Source/Project64/Settings/SettingType/SettingsType-GameSettingIndex.cpp b/Source/Project64/Settings/SettingType/SettingsType-GameSettingIndex.cpp index fd94ab39e..ec6f39826 100644 --- a/Source/Project64/Settings/SettingType/SettingsType-GameSettingIndex.cpp +++ b/Source/Project64/Settings/SettingType/SettingsType-GameSettingIndex.cpp @@ -51,7 +51,8 @@ bool CSettingTypeGameIndex::Load ( int Index, stdstr & Value ) const //return the default values void CSettingTypeGameIndex::LoadDefault ( int Index, bool & Value ) const { - Notify().BreakPoint(__FILE__,__LINE__); + m_KeyNameIdex.Format("%s%d%s",m_PreIndex.c_str(),Index,m_PostIndex.c_str()); + CSettingTypeGame::LoadDefault(0,Value); } void CSettingTypeGameIndex::LoadDefault ( int Index, ULONG & Value ) const @@ -90,5 +91,6 @@ void CSettingTypeGameIndex::Save ( int Index, const char * Value ) void CSettingTypeGameIndex::Delete ( int Index ) { - Notify().BreakPoint(__FILE__,__LINE__); + m_KeyNameIdex.Format("%s%d%s",m_PreIndex.c_str(),Index,m_PostIndex.c_str()); + CSettingTypeGame::Delete(0); } diff --git a/Source/Project64/Settings/Settings Class.cpp b/Source/Project64/Settings/Settings Class.cpp index 372ea008a..4aef76fdb 100644 --- a/Source/Project64/Settings/Settings Class.cpp +++ b/Source/Project64/Settings/Settings Class.cpp @@ -68,14 +68,16 @@ void CSettings::AddHowToHandleSetting () //Support Files - AddHandler(SupportFile_Settings, new CSettingTypeRelativePath("","Project64.cfg")); - AddHandler(SupportFile_RomDatabase, new CSettingTypeRelativePath("","Project64.rdb")); - AddHandler(SupportFile_Cheats, new CSettingTypeRelativePath("","Project64.cht")); - AddHandler(SupportFile_Notes, new CSettingTypeRelativePath("","Project64.rdn")); - AddHandler(SupportFile_ExtInfo, new CSettingTypeRelativePath("","Project64.rdx")); - AddHandler(SupportFile_ShortCuts, new CSettingTypeRelativePath("","Project64.sc3")); - AddHandler(SupportFile_RomListCache,new CSettingTypeRelativePath("","Project64.cache3")); - AddHandler(SupportFile_7zipCache, new CSettingTypeRelativePath("","Project64.zcache")); + AddHandler(SupportFile_SettingsDefault, new CSettingTypeRelativePath("Config","Project64.cfg")); + AddHandler(SupportFile_Settings, new CSettingTypeApplication("","ConfigFile",SupportFile_SettingsDefault)); + AddHandler(SupportFile_SettingsDefault, new CSettingTypeRelativePath("Config","Project64.cfg")); + AddHandler(SupportFile_RomDatabase, new CSettingTypeRelativePath("Config","Project64.rdb")); + AddHandler(SupportFile_Cheats, new CSettingTypeRelativePath("Config","Project64.cht")); + AddHandler(SupportFile_Notes, new CSettingTypeRelativePath("Config","Project64.rdn")); + AddHandler(SupportFile_ExtInfo, new CSettingTypeRelativePath("Config","Project64.rdx")); + AddHandler(SupportFile_ShortCuts, new CSettingTypeRelativePath("Config","Project64.sc3")); + AddHandler(SupportFile_RomListCache,new CSettingTypeRelativePath("Config","Project64.cache3")); + AddHandler(SupportFile_7zipCache, new CSettingTypeRelativePath("Config","Project64.zcache")); //AddHandler(SyncPluginDir, new CSettingTypeRelativePath("SyncPlugin","")); @@ -279,6 +281,8 @@ void CSettings::AddHowToHandleSetting () AddHandler(Cheat_Extension, new CSettingTypeGameIndex("Cheat",".exten","??? - Not Set")); AddHandler(Cheat_Notes, new CSettingTypeCheats("_N")); AddHandler(Cheat_Options, new CSettingTypeCheats("_O")); + AddHandler(Cheat_Range, new CSettingTypeCheats("_R")); + AddHandler(Cheat_RangeNotes, new CSettingTypeCheats("_RN")); /* INFO(SettingsIniName,Default_None,Data_String,RelativePath,"Project64.cfg","",0); if (SettingsIniFile == NULL) diff --git a/Source/Project64/User Interface/UI Resources.aps b/Source/Project64/User Interface/UI Resources.aps index 68ea8439f60951344ba28ce8554cab34d080aa95..768c034cdc27697c4ca1002d96a950fdf672ab56 100644 GIT binary patch delta 10242 zcmcIq3w)DRmOnR5OIs=y+U8OE66=#9c{f26(&TF!nkF%if>`>2Jfu+GARu6hycOkf z(clX~&_zHfRITGUg3bfRC+xC2?vA72IwQLdD5I;c%h)~l-tSA3#@*lkc7L1SFZpu+ z|8veg_jT^MH+lE+khL!k-s;WjYSz;8Gop0N#Tufe9T&&o=b?*D`1$?CYl*hI?9zrT zeC)e?vH%|)Kb|Zj+8*0bvO$Z_*DJ}%LVT_@k(1XEZNlF|MwJ5)sDhbV04-EiiPHW; zfNU_CAhEZFRHMeJ7V=&8V3bi`1hsMxCr-B#tTlo3s>FLT3HF?rM27#A;F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vJxIg!f7N2ES%h0e)MK=X!?4hxUm#U1ss`3hug3+BPY@i4^Gf#!&`PK9&A~#cv*k zFN9=AfQx%{dwwIH>ybaC^kw)(X80L&r`yjl*Pr_%QmDl5=m$?-|NB2DoSIP#xET;W h`!0*4m*B_6$-nRZ1>y2}Ox(^LrEu2WR$=tm`#;6O=X(GE diff --git a/Source/Project64/User Interface/UI Resources.rc b/Source/Project64/User Interface/UI Resources.rc index 17fe0adbd..707b8ae02 100644 --- a/Source/Project64/User Interface/UI Resources.rc +++ b/Source/Project64/User Interface/UI Resources.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (Australia) resources +// English (U.S.) resources -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 diff --git a/Source/Project64/main.cpp b/Source/Project64/main.cpp index 037a6c564..ea6b625b6 100644 --- a/Source/Project64/main.cpp +++ b/Source/Project64/main.cpp @@ -5,6 +5,7 @@ #include "Support.h" #include #include "Validate Binary.h" +#include //#pragma comment(linker,"/merge:.rdata=.text") @@ -152,7 +153,13 @@ void LogFlushChanged (CTraceFileLog * LogFile) void InitializeLog ( void) { - CPath LogFilePath(CPath::MODULE_DIRECTORY,_T("Project64.log")); + CPath LogFilePath(CPath::MODULE_DIRECTORY); + LogFilePath.AppendDirectory("Logs"); + if (!LogFilePath.DirectoryExists()) + { + LogFilePath.CreateDirectory(); + } + LogFilePath.SetNameExtension(_T("Project64.log")); CTraceFileLog * LogFile = new CTraceFileLog(LogFilePath, _Settings->LoadDword(Debugger_AppLogFlush) != 0, Log_New); #ifdef VALIDATE_DEBUG @@ -166,11 +173,79 @@ void InitializeLog ( void) _Settings->RegisterChangeCB(Debugger_AppLogFlush,LogFile,(CSettings::SettingChangedFunc)LogFlushChanged); } -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszArgs, int nWinMode) { +/*bool ChangeDirPermission ( const CPath & Dir) +{ + if (Dir.DirectoryExists()) + { + HANDLE hDir = CreateFile(Dir,READ_CONTROL|WRITE_DAC,0,NULL,OPEN_EXISTING,FILE_FLAG_BACKUP_SEMANTICS,NULL); + if (hDir != INVALID_HANDLE_VALUE) + { + ACL * pOldDACL = NULL; + PSECURITY_DESCRIPTOR pSD = NULL; + + if (GetSecurityInfo(hDir,SE_FILE_OBJECT,DACL_SECURITY_INFORMATION,NULL,NULL,&pOldDACL,NULL,&pSD) == ERROR_SUCCESS) + { + bool bAdd = true; + + PEXPLICIT_ACCESS_W pListOfExplictEntries; + ULONG cCountOfExplicitEntries; + if (GetExplicitEntriesFromAclW(pOldDACL,&cCountOfExplicitEntries,&pListOfExplictEntries) == ERROR_SUCCESS) + { + for (int i = 0; i < cCountOfExplicitEntries; i ++) + { + EXPLICIT_ACCESS_W &ea = pListOfExplictEntries[i]; + if (ea.grfAccessMode != GRANT_ACCESS) { continue; } + if (ea.grfAccessPermissions != GENERIC_ALL) { continue; } + if ((ea.grfInheritance & (CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE)) != (CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE)) { continue; } + + if (ea.Trustee.TrusteeType == TRUSTEE_IS_SID) + { + + } + bAdd = false; + } + } + + if (bAdd) + { + EXPLICIT_ACCESS ea = {0}; + ea.grfAccessMode = GRANT_ACCESS; + ea.grfAccessPermissions = GENERIC_ALL; + ea.grfInheritance = CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE; + ea.Trustee.TrusteeType = TRUSTEE_IS_GROUP; + ea.Trustee.TrusteeForm = TRUSTEE_IS_NAME; + ea.Trustee.ptstrName = TEXT("Users"); + + ACL * pNewDACL = NULL; + SetEntriesInAcl(1,&ea,pOldDACL,&pNewDACL); + + SetSecurityInfo(hDir,SE_FILE_OBJECT,DACL_SECURITY_INFORMATION,NULL,NULL,pNewDACL,NULL); + LocalFree(pNewDACL); + } + LocalFree(pSD); + } + CloseHandle(hDir); + } + } + return true; +}*/ + +void FixDirectories ( void ) +{ + + CPath(CPath::MODULE_DIRECTORY,_T("Config")).CreateDirectory(); + CPath(CPath::MODULE_DIRECTORY,_T("Logs")).CreateDirectory(); + CPath(CPath::MODULE_DIRECTORY,_T("Save")).CreateDirectory(); + CPath(CPath::MODULE_DIRECTORY,_T("Screenshots")).CreateDirectory(); +} + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszArgs, int nWinMode) +{ + FixDirectories(); + CoInitialize(NULL); try { - LPCSTR AppName = "Project64 1.7"; _Lang = new CLanguage();