From 5cc7c2356f01f91944164a00ad25d6614f6a03e9 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 10 Jun 2023 01:18:17 +0100 Subject: [PATCH] Update QSBCore.cs --- QSB/QSBCore.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index a283972a..c165c3f4 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -152,6 +152,27 @@ public class QSBCore : ModBehaviour _steamworksInitialized = true; } + else + { + DebugLog.ToConsole($"Is steam - overriding AppID"); + OverrideAppId(); + } + } + + public void OverrideAppId() + { + SteamManager.s_EverInitialized = false; + SteamManager.s_instance.m_bInitialized = false; + var instance = SteamManager.s_instance; + instance.m_bInitialized = false; + SteamManager.s_instance = null; + + SteamAPI.Shutdown(); + + System.Environment.SetEnvironmentVariable("SteamAppId", "480"); + System.Environment.SetEnvironmentVariable("SteamGameId", "480"); + + instance.InitializeOnAwake(); } public void OnDestroy()