(Windows) Fixed a MinGW compile error.

This commit is contained in:
Leon Styhre 2022-04-30 21:19:15 +02:00
parent 032e769369
commit 4d5364e9e4
2 changed files with 4 additions and 3 deletions

View file

@ -147,7 +147,7 @@ namespace Utils
}
int launchGameWindows(const std::wstring& cmd_utf16,
std::wstring& startDirectory,
const std::wstring& startDirectory,
bool runInBackground,
bool hideWindow)
{
@ -165,7 +165,8 @@ namespace Utils
bool processReturnValue = true;
DWORD errorCode = 0;
wchar_t* startDir {startDirectory == L"" ? nullptr : &startDirectory[0]};
std::wstring startDirectoryTemp {startDirectory};
wchar_t* startDir {startDirectory == L"" ? nullptr : &startDirectoryTemp[0]};
// clang-format off
processReturnValue = CreateProcessW(

View file

@ -37,7 +37,7 @@ namespace Utils
const std::string& startDirectory,
bool runInBackground);
int launchGameWindows(const std::wstring& cmd_utf16,
std::wstring& startDirectory,
const std::wstring& startDirectory,
bool runInBackground,
bool hideWindow);