From 016fb2fc763e27b2625736d8790246cb89ccd99a Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 10 May 2021 14:57:57 +0300 Subject: [PATCH] steam_helper: Create Valve_SteamIPC_Class event. For 2K Launcher. CW-Bug-Id: 18912 --- steam_helper/steam.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 9f194c1e..b9f8ce2f 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -1063,6 +1063,7 @@ static BOOL steam_protocol_handler(int argc, char *argv[]) int main(int argc, char *argv[]) { HANDLE wait_handle = INVALID_HANDLE_VALUE; + HANDLE event2 = INVALID_HANDLE_VALUE; HANDLE event = INVALID_HANDLE_VALUE; BOOL game_process = FALSE; @@ -1076,6 +1077,9 @@ int main(int argc, char *argv[]) /* do setup only for game process */ event = CreateEventA(NULL, FALSE, FALSE, "Steam3Master_SharedMemLock"); + /* For 2K Launcher. */ + event2 = CreateEventA(NULL, FALSE, FALSE, "Global\\Valve_SteamIPC_Class"); + CreateThread(NULL, 0, create_steam_window, NULL, 0, NULL); set_active_process_pid(); @@ -1117,6 +1121,7 @@ int main(int argc, char *argv[]) if (event != INVALID_HANDLE_VALUE) CloseHandle(event); - + if (event2 != INVALID_HANDLE_VALUE) + CloseHandle(event2); return 0; }