From 3f160f54a4f86c678c7d0b349a74338b577fd09a Mon Sep 17 00:00:00 2001 From: G-Moris Date: Tue, 12 Aug 2025 00:59:03 +0300 Subject: [PATCH 1/7] Update MainFunctions.cpp --- Client/loader/MainFunctions.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Client/loader/MainFunctions.cpp b/Client/loader/MainFunctions.cpp index 0ace6d022d..9737b76f96 100644 --- a/Client/loader/MainFunctions.cpp +++ b/Client/loader/MainFunctions.cpp @@ -1052,7 +1052,18 @@ BOOL StartGtaProcess(const SString& lpApplicationName, const SString& lpCommandL *FromUTF8(lpCurrentDirectory), &startupInfo, lpProcessInformation); if (wasProcessCreated) + { + // Rough patch + constexpr char newDocumentPath[] = "MTA San Andreas User Files"; + void* ducumentPathAddress = (void*)0x8747A9; + + DWORD oldProtect; + VirtualProtectEx(lpProcessInformation->hProcess, ducumentPathAddress, 32, PAGE_EXECUTE_READWRITE, &oldProtect); + WriteProcessMemory(lpProcessInformation->hProcess, ducumentPathAddress, newDocumentPath, sizeof(newDocumentPath), nullptr); + VirtualProtectEx(lpProcessInformation->hProcess, ducumentPathAddress, 32, oldProtect, &oldProtect); + return true; + } std::vector processIdListBefore = GetGTAProcessList(); From 73ed91ff2fc01ff37e94e420a12ada9a906534ce Mon Sep 17 00:00:00 2001 From: G-Moris Date: Tue, 12 Aug 2025 21:11:43 +0300 Subject: [PATCH 2/7] Revert --- Client/loader/MainFunctions.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Client/loader/MainFunctions.cpp b/Client/loader/MainFunctions.cpp index 9737b76f96..0ace6d022d 100644 --- a/Client/loader/MainFunctions.cpp +++ b/Client/loader/MainFunctions.cpp @@ -1052,18 +1052,7 @@ BOOL StartGtaProcess(const SString& lpApplicationName, const SString& lpCommandL *FromUTF8(lpCurrentDirectory), &startupInfo, lpProcessInformation); if (wasProcessCreated) - { - // Rough patch - constexpr char newDocumentPath[] = "MTA San Andreas User Files"; - void* ducumentPathAddress = (void*)0x8747A9; - - DWORD oldProtect; - VirtualProtectEx(lpProcessInformation->hProcess, ducumentPathAddress, 32, PAGE_EXECUTE_READWRITE, &oldProtect); - WriteProcessMemory(lpProcessInformation->hProcess, ducumentPathAddress, newDocumentPath, sizeof(newDocumentPath), nullptr); - VirtualProtectEx(lpProcessInformation->hProcess, ducumentPathAddress, 32, oldProtect, &oldProtect); - return true; - } std::vector processIdListBefore = GetGTAProcessList(); From dd38f6a7a97a6512dc021d5c40fde2c184cca45d Mon Sep 17 00:00:00 2001 From: G-Moris Date: Tue, 12 Aug 2025 21:15:33 +0300 Subject: [PATCH 3/7] Update CCore.cpp --- Client/core/CCore.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Client/core/CCore.cpp b/Client/core/CCore.cpp index 152320a6b8..48dd02f4e6 100644 --- a/Client/core/CCore.cpp +++ b/Client/core/CCore.cpp @@ -836,6 +836,15 @@ void CCore::ApplyHooks() { WriteDebugEvent("CCore::ApplyHooks"); + constexpr char newDocumentPath[] = "MTA San Andreas User Files"; + void* ducumentPathAddress = (void*)0x8747A9; + HANDLE currentProcess = GetCurrentProcess(); + + DWORD oldProtect; + VirtualProtectEx(currentProcess, ducumentPathAddress, 32, PAGE_EXECUTE_READWRITE, &oldProtect); + WriteProcessMemory(currentProcess, ducumentPathAddress, newDocumentPath, sizeof(newDocumentPath), nullptr); + VirtualProtectEx(currentProcess, ducumentPathAddress, 32, oldProtect, &oldProtect); + // Create our hooks. m_pDirectInputHookManager->ApplyHook(); // m_pDirect3DHookManager->ApplyHook ( ); From 8dac4a1112ed7265862e70c40385cd001a87ce8c Mon Sep 17 00:00:00 2001 From: G-Moris Date: Wed, 13 Aug 2025 15:57:02 +0300 Subject: [PATCH 4/7] Update CScreenShot.cpp --- Client/core/CScreenShot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/core/CScreenShot.cpp b/Client/core/CScreenShot.cpp index 4826461431..8d3a2ccf5f 100644 --- a/Client/core/CScreenShot.cpp +++ b/Client/core/CScreenShot.cpp @@ -54,7 +54,7 @@ void CScreenShot::InitiateScreenShot(bool bIsCameraShot) if (savePhotoInDocuments) { // Set the screenshot path to camera gallery path - ms_strScreenDirectoryPath = PathJoin(GetSystemPersonalPath(), "GTA San Andreas User Files", "Gallery"); + ms_strScreenDirectoryPath = PathJoin(GetSystemPersonalPath(), "MTA San Andreas User Files", "Gallery"); } } else From 6a5fa5ed1df7d95f2f6d539cdc768dde5f56b350 Mon Sep 17 00:00:00 2001 From: G-Moris Date: Wed, 13 Aug 2025 15:57:39 +0300 Subject: [PATCH 5/7] Update CSettings.cpp --- Client/core/CSettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/core/CSettings.cpp b/Client/core/CSettings.cpp index 159c4f8502..3d3d328625 100644 --- a/Client/core/CSettings.cpp +++ b/Client/core/CSettings.cpp @@ -412,7 +412,7 @@ void CSettings::CreateGUI() m_pCheckBoxAllowSteamClient->AutoSize(NULL, 20.0f); // Enable camera photos getting saved to documents folder - m_pPhotoSavingCheckbox = reinterpret_cast(pManager->CreateCheckBox(pTabMultiplayer, _("Save photos taken by camera weapon to GTA San Andreas User Files folder"), true)); + m_pPhotoSavingCheckbox = reinterpret_cast(pManager->CreateCheckBox(pTabMultiplayer, _("Save photos taken by camera weapon to MTA San Andreas User Files folder"), true)); m_pPhotoSavingCheckbox->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 20.0f)); m_pPhotoSavingCheckbox->GetPosition(vecTemp, false); m_pPhotoSavingCheckbox->AutoSize(NULL, 20.0f); From 716c3eba5ef8dc76090fc87760f345ca9f62096d Mon Sep 17 00:00:00 2001 From: G-Moris Date: Wed, 13 Aug 2025 15:58:20 +0300 Subject: [PATCH 6/7] Update CInstallManager.cpp --- Client/loader/CInstallManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/loader/CInstallManager.cpp b/Client/loader/CInstallManager.cpp index 02f4aa4e6d..12a0121cc6 100644 --- a/Client/loader/CInstallManager.cpp +++ b/Client/loader/CInstallManager.cpp @@ -1088,7 +1088,7 @@ SString CInstallManager::_ProcessLangFileChecks() const char* langFileNames[] = {"american.gxt", "french.gxt", "german.gxt", "italian.gxt", "spanish.gxt"}; // Get language that will be used - SString strSettingsFilename = PathJoin(GetSystemPersonalPath(), "GTA San Andreas User Files", "gta_sa.set"); + SString strSettingsFilename = PathJoin(GetSystemPersonalPath(), "MTA San Andreas User Files", "gta_sa.set"); FILE* fh = File::Fopen(strSettingsFilename, "rb"); if (fh) { From ab21d9ef768df1f0afe2fcfee1b9137a35a013cc Mon Sep 17 00:00:00 2001 From: G-Moris Date: Wed, 13 Aug 2025 15:58:43 +0300 Subject: [PATCH 7/7] Update MainFunctions.cpp --- Client/loader/MainFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/loader/MainFunctions.cpp b/Client/loader/MainFunctions.cpp index 0ace6d022d..91e2c65229 100644 --- a/Client/loader/MainFunctions.cpp +++ b/Client/loader/MainFunctions.cpp @@ -314,7 +314,7 @@ void HandleResetSettings() CheckAndShowMissingFileMessage(); - SString strSaveFilePath = PathJoin(GetSystemPersonalPath(), "GTA San Andreas User Files"); + SString strSaveFilePath = PathJoin(GetSystemPersonalPath(), "MTA San Andreas User Files"); SString strSettingsFilename = PathJoin(strSaveFilePath, "gta_sa.set"); SString strSettingsFilenameBak = PathJoin(strSaveFilePath, "gta_sa_old.set");