fix LaunchGame launching wrong version of executable
This commit is contained in:
@@ -176,9 +176,20 @@ void LaunchGame()
|
|||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
ZeroMemory( &si, sizeof(si) );
|
ZeroMemory( &si, sizeof(si) );
|
||||||
|
|
||||||
|
CString sFile = PRODUCT_NAME ".exe";
|
||||||
|
if( !DoesFileExist(sFile) )
|
||||||
|
{
|
||||||
|
sFile = "Program\\" + sFile;
|
||||||
|
if( !DoesFileExist(sFile) )
|
||||||
|
{
|
||||||
|
MessageBox( NULL, "Error", "Could not find " PRODUCT_NAME ".exe", MB_ICONEXCLAMATION );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CreateProcess(
|
CreateProcess(
|
||||||
NULL, // pointer to name of executable module
|
sFile, // pointer to name of executable module
|
||||||
PRODUCT_NAME ".exe", // pointer to command line string
|
NULL, // pointer to command line string
|
||||||
NULL, // process security attributes
|
NULL, // process security attributes
|
||||||
NULL, // thread security attributes
|
NULL, // thread security attributes
|
||||||
false, // handle inheritance flag
|
false, // handle inheritance flag
|
||||||
|
|||||||
Reference in New Issue
Block a user