Skip to content

Commit 373bb69

Browse files
committed
1.6: Addendum to last
1 parent 1e35a6a commit 373bb69

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Client/cefweb/CWebApp.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ void CWebApp::OnBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_line)
9393
if (!command_line)
9494
return;
9595

96+
// Add GTA path and MTA base path switches before g_pCore check
97+
// This callback runs in both browser process and subprocess
98+
// In subprocess, g_pCore is NULL, so switches must be added before that check
99+
// Read GTA path from registry
100+
int iResult = 0;
101+
const SString strGTAPath = GetCommonRegistryValue("", "GTA:SA Path", &iResult);
102+
if (!strGTAPath.empty())
103+
{
104+
// Pass GTA directory path to CEFLauncher subprocess via command-line switch
105+
// CEF's AppendSwitchWithValue handles quoting automatically
106+
command_line->AppendSwitchWithValue("mta-gta-path", strGTAPath);
107+
// AddReportLog only available in browser process where g_pCore exists
108+
}
96109
const CefString processType = command_line->GetSwitchValue("type");
97110
ConfigureCommandLineSwitches(command_line, processType);
98111
}

0 commit comments

Comments
 (0)