1 Commits
v2.6.3 ... 193

Author SHA1 Message Date
Tixx
db1aad37a8 Change and debug CreateProcessW params 2025-09-23 22:40:36 +02:00

View File

@@ -148,7 +148,13 @@ void StartGame(std::wstring 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) {
info("Game Launched!");
GamePID = pi.dwProcessId;