steam.exe: Create Steam for Windows named event.

This event is sometimes checked for existence by Denuvo DRM, to decide
whether the game is genuine. This the case in Just Cause 3, and not
having it makes the game delete all saved progress.
This commit is contained in:
Rémi Bernon 2020-02-21 16:56:09 +01:00 committed by Andrew Eikum
parent c6cead45dc
commit 1e4083027f

View File

@ -261,12 +261,15 @@ run:
int main(int argc, char *argv[])
{
HANDLE wait_handle = INVALID_HANDLE_VALUE;
HANDLE event = INVALID_HANDLE_VALUE;
WINE_TRACE("\n");
if (getenv("SteamGameId"))
{
/* do setup only for game process */
event = CreateEventA(NULL, FALSE, FALSE, "Steam3Master_SharedMemLock");
CreateThread(NULL, 0, create_steam_window, NULL, 0, NULL);
set_active_process_pid();
@ -292,5 +295,8 @@ int main(int argc, char *argv[])
WaitForSingleObject(wait_handle, INFINITE);
if (event != INVALID_HANDLE_VALUE)
CloseHandle(event);
return 0;
}