File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments