Skip to content
Open
9 changes: 9 additions & 0 deletions Client/core/CCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( );
Expand Down
2 changes: 1 addition & 1 deletion Client/core/CScreenShot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Client/core/CSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CGUICheckBox*>(pManager->CreateCheckBox(pTabMultiplayer, _("Save photos taken by camera weapon to GTA San Andreas User Files folder"), true));
m_pPhotoSavingCheckbox = reinterpret_cast<CGUICheckBox*>(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);
Expand Down
2 changes: 1 addition & 1 deletion Client/loader/CInstallManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion Client/loader/MainFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down