public static void Init(uint appid) { System.Environment.SetEnvironmentVariable("SteamAppId", appid.ToString()); System.Environment.SetEnvironmentVariable("SteamGameId", appid.ToString()); if (!SteamAPI.Init()) { throw new System.Exception("SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId."); } AppId = appid; initialized = true; SteamApps.InstallEvents(); SteamUtils.InstallEvents(); SteamParental.InstallEvents(); SteamMusic.InstallEvents(); SteamVideo.InstallEvents(); SteamUser.InstallEvents(); SteamFriends.InstallEvents(); SteamScreenshots.InstallEvents(); SteamUserStats.InstallEvents(); SteamInventory.InstallEvents(); SteamNetworking.InstallEvents(); SteamMatchmaking.InstallEvents(); SteamParties.InstallEvents(); SteamNetworkingSockets.InstallEvents(); SteamInput.InstallEvents(); RunCallbacksAsync(); }
public static void Shutdown() { Event.DisposeAllClient(); initialized = false; ShutdownInterfaces(); SteamApps.Shutdown(); SteamUtils.Shutdown(); SteamParental.Shutdown(); SteamMusic.Shutdown(); SteamVideo.Shutdown(); SteamUser.Shutdown(); SteamFriends.Shutdown(); SteamScreenshots.Shutdown(); SteamUserStats.Shutdown(); SteamInventory.Shutdown(); SteamNetworking.Shutdown(); SteamMatchmaking.Shutdown(); SteamParties.Shutdown(); SteamNetworkingUtils.Shutdown(); SteamNetworkingSockets.Shutdown(); ServerList.Base.Shutdown(); SteamAPI.Shutdown(); }
public static void Init(uint appid) { if (IntPtr.Size != 8) { throw new Exception("Only 64bit processes are currently supported"); } Environment.SetEnvironmentVariable("SteamAppId", appid.ToString()); Environment.SetEnvironmentVariable("SteamGameId", appid.ToString()); if (!SteamAPI.Init()) { throw new Exception("SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId."); } SteamClient.AppId = appid; SteamClient.initialized = true; SteamApps.InstallEvents(); SteamUtils.InstallEvents(); SteamParental.InstallEvents(); SteamMusic.InstallEvents(); SteamVideo.InstallEvents(); SteamUser.InstallEvents(); SteamFriends.InstallEvents(); SteamScreenshots.InstallEvents(); SteamUserStats.InstallEvents(); SteamInventory.InstallEvents(); SteamNetworking.InstallEvents(); SteamMatchmaking.InstallEvents(); SteamParties.InstallEvents(); SteamNetworkingSockets.InstallEvents(); SteamClient.RunCallbacksAsync(); }