Skip to content

Commit

Permalink
Print out why windows binary fail to start.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Jul 26, 2024
1 parent 0602c5f commit 94e41fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cs2djitwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ int main(int argc, char* argv[])
startupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);

/* Start process */
fwprintf(stderr, L"Launching cs2d_dedicated.exe with path: %s\n", dedicatedFile);
if (CreateProcessW(
dedicatedFile, /* lpApplicationName */
GetCommandLineW(), /* lpCommandLine */
Expand All @@ -135,7 +136,8 @@ int main(int argc, char* argv[])
&processInfo /* lpProcessInformation */
) == 0)
{
fputs("Failed to start cs2d_dedicated.exe\n", stderr);
// fputs("Failed to start cs2d_dedicated.exe", stderr);
fprintf(stderr, "Failed to start cs2d_dedicated.exe: %d\n", (int) GetLastError());
free(currentDir);
free(dedicatedFile);
return 1;
Expand Down

0 comments on commit 94e41fb

Please sign in to comment.