From 985aefc2de951f7dfe7ce71df7097236130c9b3d Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 19 Jun 2019 11:35:35 +0100 Subject: [PATCH] SteamInput Base --- Facepunch.Steamworks/SteamClient.cs | 2 ++ Facepunch.Steamworks/SteamInput.cs | 38 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Facepunch.Steamworks/SteamInput.cs diff --git a/Facepunch.Steamworks/SteamClient.cs b/Facepunch.Steamworks/SteamClient.cs index f9499d1..c0f3969 100644 --- a/Facepunch.Steamworks/SteamClient.cs +++ b/Facepunch.Steamworks/SteamClient.cs @@ -43,6 +43,7 @@ public static void Init( uint appid ) SteamMatchmaking.InstallEvents(); SteamParties.InstallEvents(); SteamNetworkingSockets.InstallEvents(); + SteamInput.InstallEvents(); RunCallbacksAsync(); } @@ -102,6 +103,7 @@ public static void Shutdown() SteamParties.Shutdown(); SteamNetworkingUtils.Shutdown(); SteamNetworkingSockets.Shutdown(); + SteamInput.Shutdown(); ServerList.Base.Shutdown(); SteamAPI.Shutdown(); diff --git a/Facepunch.Steamworks/SteamInput.cs b/Facepunch.Steamworks/SteamInput.cs new file mode 100644 index 0000000..c028da0 --- /dev/null +++ b/Facepunch.Steamworks/SteamInput.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + +namespace Steamworks +{ + public static class SteamInput + { + static ISteamInput _internal; + internal static ISteamInput Internal + { + get + { + if ( _internal == null ) + { + _internal = new ISteamInput(); + _internal.Init(); + } + + return _internal; + } + } + + internal static void Shutdown() + { + _internal = null; + } + + internal static void InstallEvents() + { + // None? + } + + } +} \ No newline at end of file