v1.0.13.1 (first post-1.0 patch)
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Steamworks
|
||||
{
|
||||
public class SteamInput : SteamClientClass<SteamInput>
|
||||
{
|
||||
internal static ISteamInput Internal => Interface as ISteamInput;
|
||||
internal static ISteamInput? Internal => Interface as ISteamInput;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static void RunFrame()
|
||||
{
|
||||
Internal.RunFrame();
|
||||
Internal?.RunFrame();
|
||||
}
|
||||
|
||||
static readonly InputHandle_t[] queryArray = new InputHandle_t[STEAM_CONTROLLER_MAX_COUNT];
|
||||
@@ -34,7 +34,7 @@ namespace Steamworks
|
||||
{
|
||||
get
|
||||
{
|
||||
var num = Internal.GetConnectedControllers( queryArray );
|
||||
var num = Internal?.GetConnectedControllers( queryArray ) ?? 0;
|
||||
|
||||
for ( int i = 0; i < num; i++ )
|
||||
{
|
||||
@@ -52,8 +52,10 @@ namespace Steamworks
|
||||
/// <param name="controller"></param>
|
||||
/// <param name="action"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetDigitalActionGlyph( Controller controller, string action )
|
||||
public static string? GetDigitalActionGlyph( Controller controller, string action )
|
||||
{
|
||||
if (Internal is null) { return null; }
|
||||
|
||||
InputActionOrigin origin = InputActionOrigin.None;
|
||||
|
||||
Internal.GetDigitalActionOrigins(
|
||||
@@ -69,6 +71,8 @@ namespace Steamworks
|
||||
internal static Dictionary<string, InputDigitalActionHandle_t> DigitalHandles = new Dictionary<string, InputDigitalActionHandle_t>();
|
||||
internal static InputDigitalActionHandle_t GetDigitalActionHandle( string name )
|
||||
{
|
||||
if (Internal is null) { return default; }
|
||||
|
||||
if ( DigitalHandles.TryGetValue( name, out var val ) )
|
||||
return val;
|
||||
|
||||
@@ -80,6 +84,8 @@ namespace Steamworks
|
||||
internal static Dictionary<string, InputAnalogActionHandle_t> AnalogHandles = new Dictionary<string, InputAnalogActionHandle_t>();
|
||||
internal static InputAnalogActionHandle_t GetAnalogActionHandle( string name )
|
||||
{
|
||||
if (Internal is null) { return default; }
|
||||
|
||||
if ( AnalogHandles.TryGetValue( name, out var val ) )
|
||||
return val;
|
||||
|
||||
@@ -91,6 +97,8 @@ namespace Steamworks
|
||||
internal static Dictionary<string, InputActionSetHandle_t> ActionSets = new Dictionary<string, InputActionSetHandle_t>();
|
||||
internal static InputActionSetHandle_t GetActionSetHandle( string name )
|
||||
{
|
||||
if (Internal is null) { return default; }
|
||||
|
||||
if ( ActionSets.TryGetValue( name, out var val ) )
|
||||
return val;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user