|
|
@ -1581,21 +1581,20 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC |
|
|
|
si.cb = sizeof(si); |
|
|
|
si.cb = sizeof(si); |
|
|
|
wchar cmdLine[MAX_PATH]; |
|
|
|
wchar cmdLine[MAX_PATH]; |
|
|
|
const wchar ** addrs; |
|
|
|
const wchar ** addrs; |
|
|
|
unsigned count; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!eventExists) // if it is missing, assume patcher wasn't launched
|
|
|
|
if (!eventExists) // if it is missing, assume patcher wasn't launched
|
|
|
|
{ |
|
|
|
{ |
|
|
|
StrCopy(cmdLine, s_patcherExeName, arrsize(cmdLine)); |
|
|
|
StrCopy(cmdLine, s_patcherExeName, arrsize(cmdLine)); |
|
|
|
count = GetAuthSrvHostnames(&addrs); |
|
|
|
GetAuthSrvHostnames(&addrs); |
|
|
|
if(count && AuthSrvHostnameOverride()) |
|
|
|
if(wcslen(addrs[0])) |
|
|
|
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /AuthSrv=%ws", cmdLine, addrs[0]); |
|
|
|
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /AuthSrv=%ws", cmdLine, addrs[0]); |
|
|
|
|
|
|
|
|
|
|
|
count = GetFileSrvHostnames(&addrs); |
|
|
|
GetFileSrvHostnames(&addrs); |
|
|
|
if(count && FileSrvHostnameOverride()) |
|
|
|
if(wcslen(addrs[0])) |
|
|
|
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /FileSrv=%ws", cmdLine, addrs[0]); |
|
|
|
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /FileSrv=%ws", cmdLine, addrs[0]); |
|
|
|
|
|
|
|
|
|
|
|
count = GetGateKeeperSrvHostnames(&addrs); |
|
|
|
GetGateKeeperSrvHostnames(&addrs); |
|
|
|
if(count && GateKeeperSrvHostnameOverride()) |
|
|
|
if(wcslen(addrs[0])) |
|
|
|
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /GateKeeperSrv=%ws", cmdLine, addrs[0]); |
|
|
|
StrPrintf(cmdLine, arrsize(cmdLine), L"%ws /GateKeeperSrv=%ws", cmdLine, addrs[0]); |
|
|
|
|
|
|
|
|
|
|
|
if(!CreateProcessW(NULL, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) |
|
|
|
if(!CreateProcessW(NULL, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) |
|
|
|