mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2025-01-01 16:53:01 +05:00
Small scope fix
This commit is contained in:
parent
63ba94e547
commit
89e2a8d121
1 changed files with 7 additions and 7 deletions
|
@ -710,14 +710,14 @@ void DrawRect_HalfPixel_Steam(CRect& rect, const CRGBA& rgba)
|
||||||
|
|
||||||
char* GetMyDocumentsPathSA()
|
char* GetMyDocumentsPathSA()
|
||||||
{
|
{
|
||||||
|
static char* const pDocumentsPath = [&] () -> char* {
|
||||||
static char cUserFilesPath[MAX_PATH];
|
static char cUserFilesPath[MAX_PATH];
|
||||||
static char* const ppTempBufPtr = Memory::GetVersion().version == 0 ? *AddressByRegion_10<char**>(0x744FE5) : cUserFilesPath;
|
char* const ppTempBufPtr = Memory::GetVersion().version == 0 ? *AddressByRegion_10<char**>(0x744FE5) : cUserFilesPath;
|
||||||
|
|
||||||
static bool initPath = [&] () {
|
|
||||||
char** const ppUserFilesDir = AddressByVersion<char**>(0x74503F, 0x74586F, 0x77EE50, 0x77902B, 0x778F1B);
|
|
||||||
|
|
||||||
if ( SHGetFolderPathA(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, ppTempBufPtr) == S_OK )
|
if ( SHGetFolderPathA(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, ppTempBufPtr) == S_OK )
|
||||||
{
|
{
|
||||||
|
char** const ppUserFilesDir = AddressByVersion<char**>(0x74503F, 0x74586F, 0x77EE50, 0x77902B, 0x778F1B);
|
||||||
|
|
||||||
PathAppendA(ppTempBufPtr, *ppUserFilesDir);
|
PathAppendA(ppTempBufPtr, *ppUserFilesDir);
|
||||||
CreateDirectoryA(ppTempBufPtr, nullptr);
|
CreateDirectoryA(ppTempBufPtr, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -736,9 +736,9 @@ char* GetMyDocumentsPathSA()
|
||||||
PathAppendA(cTmpPath, "User Tracks");
|
PathAppendA(cTmpPath, "User Tracks");
|
||||||
CreateDirectoryA(cTmpPath, nullptr);
|
CreateDirectoryA(cTmpPath, nullptr);
|
||||||
|
|
||||||
return true;
|
|
||||||
} ();
|
|
||||||
return ppTempBufPtr;
|
return ppTempBufPtr;
|
||||||
|
} ();
|
||||||
|
return pDocumentsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LARGE_INTEGER FrameTime;
|
static LARGE_INTEGER FrameTime;
|
||||||
|
|
Loading…
Reference in a new issue