From bf4847452e0ca751cfd278aec739f9f0310d85e8 Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Sat, 3 Aug 2019 18:58:23 -0400 Subject: [PATCH] SteamAPI_Shutdown actually does something now. --- dll/dll.cpp | 2 ++ dll/steam_client.cpp | 5 +++++ dll/steam_client.h | 1 + 3 files changed, 8 insertions(+) diff --git a/dll/dll.cpp b/dll/dll.cpp index 22a256eb..ec7d209b 100644 --- a/dll/dll.cpp +++ b/dll/dll.cpp @@ -135,6 +135,7 @@ Steam_Client *get_steam_clientserver_old() S_API void * S_CALLTYPE SteamInternal_CreateInterface( const char *ver ) { PRINT_DEBUG("SteamInternal_CreateInterface %s\n", ver); + if (!get_steam_client()->user_logged_in) return NULL; if (strstr(ver, "SteamClient") == ver) { void *steam_client; @@ -217,6 +218,7 @@ S_API bool S_CALLTYPE SteamAPI_InitAnonymousUser() S_API void S_CALLTYPE SteamAPI_Shutdown() { PRINT_DEBUG("SteamAPI_Shutdown\n"); + get_steam_client()->clientShutdown(); } // SteamAPI_RestartAppIfNecessary ensures that your executable was launched through Steam. diff --git a/dll/steam_client.cpp b/dll/steam_client.cpp index 38fbd8cb..48e69ac7 100644 --- a/dll/steam_client.cpp +++ b/dll/steam_client.cpp @@ -421,6 +421,11 @@ void Steam_Client::serverShutdown() server_init = false; } +void Steam_Client::clientShutdown() +{ + user_logged_in = false; +} + void Steam_Client::setAppID(uint32 appid) { std::lock_guard lock(global_mutex); diff --git a/dll/steam_client.h b/dll/steam_client.h index 7e6bc751..36f40a02 100644 --- a/dll/steam_client.h +++ b/dll/steam_client.h @@ -274,6 +274,7 @@ public: void userLogIn(); void serverInit(); void serverShutdown(); + void clientShutdown(); bool IsServerInit(); bool IsUserLogIn(); };