mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-02-16 02:30:44 +00:00
Change and debug CreateProcessW params
This commit is contained in:
@@ -148,7 +148,13 @@ void StartGame(std::wstring Dir) {
|
|||||||
|
|
||||||
debug(L"BeamNG executable path: " + Dir);
|
debug(L"BeamNG executable path: " + Dir);
|
||||||
|
|
||||||
bSuccess = CreateProcessW(nullptr, (wchar_t*)(Dir + gameArgs).c_str(), nullptr, nullptr, TRUE, 0, nullptr, BaseDir.c_str(), &si, &pi);
|
wchar_t* lpApplicationName = Dir.data();
|
||||||
|
wchar_t* lpCommandLine = (Dir + gameArgs).data();
|
||||||
|
|
||||||
|
debug(L"lpApplicationName: " + std::wstring(lpApplicationName));
|
||||||
|
debug(L"lpCommandLine: " + std::wstring(lpCommandLine));
|
||||||
|
|
||||||
|
bSuccess = CreateProcessW(lpApplicationName, lpCommandLine, nullptr, nullptr, TRUE, 0, nullptr, BaseDir.c_str(), &si, &pi);
|
||||||
if (bSuccess) {
|
if (bSuccess) {
|
||||||
info("Game Launched!");
|
info("Game Launched!");
|
||||||
GamePID = pi.dwProcessId;
|
GamePID = pi.dwProcessId;
|
||||||
|
|||||||
Reference in New Issue
Block a user