diff --git a/Facepunch.Steamworks/Enum/SteamNetworking.cs b/Facepunch.Steamworks/Enum/SteamNetworking.cs index 8961527..40df5ef 100644 --- a/Facepunch.Steamworks/Enum/SteamNetworking.cs +++ b/Facepunch.Steamworks/Enum/SteamNetworking.cs @@ -103,7 +103,7 @@ } /// High level connection status - public enum SteamNetworkingConnectionState + public enum ConnectionState { /// Dummy value used to indicate an error condition in the API. diff --git a/Facepunch.Steamworks/Generated/SteamStructs.cs b/Facepunch.Steamworks/Generated/SteamStructs.cs index f0846bb..3852077 100644 --- a/Facepunch.Steamworks/Generated/SteamStructs.cs +++ b/Facepunch.Steamworks/Generated/SteamStructs.cs @@ -12137,7 +12137,7 @@ namespace Steamworks.Data { internal NetConnection Conn; // m_hConn HSteamNetConnection internal ConnectionInfo Nfo; // m_info SteamNetConnectionInfo_t - internal SteamNetworkingConnectionState OldState; // m_eOldState ESteamNetworkingConnectionState + internal ConnectionState OldState; // m_eOldState ESteamNetworkingConnectionState #region SteamCallback internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( Config.PackSmall ? typeof(SteamNetConnectionStatusChangedCallback_t) : typeof(Pack8) ); @@ -12192,7 +12192,7 @@ namespace Steamworks.Data { internal NetConnection Conn; // m_hConn HSteamNetConnection internal ConnectionInfo Nfo; // m_info SteamNetConnectionInfo_t - internal SteamNetworkingConnectionState OldState; // m_eOldState ESteamNetworkingConnectionState + internal ConnectionState OldState; // m_eOldState ESteamNetworkingConnectionState public static implicit operator SteamNetConnectionStatusChangedCallback_t ( SteamNetConnectionStatusChangedCallback_t.Pack8 d ) => new SteamNetConnectionStatusChangedCallback_t{ Conn = d.Conn,Nfo = d.Nfo,OldState = d.OldState, }; } diff --git a/Facepunch.Steamworks/Structs/ConnectionInfo.cs b/Facepunch.Steamworks/Structs/ConnectionInfo.cs index fcd1257..7cc5319 100644 --- a/Facepunch.Steamworks/Structs/ConnectionInfo.cs +++ b/Facepunch.Steamworks/Structs/ConnectionInfo.cs @@ -12,11 +12,13 @@ namespace Steamworks.Data internal ushort pad; internal SteamNetworkingPOPID popRemote; internal SteamNetworkingPOPID popRelay; - internal SteamNetworkingConnectionState state; + internal ConnectionState state; internal int endReason; [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 128 )] internal string endDebug; [MarshalAs( UnmanagedType.ByValTStr, SizeConst = 128 )] internal string connectionDescription; + + public ConnectionState State => state; } } \ No newline at end of file diff --git a/Facepunch.Steamworks/Structs/SteamNetworking.cs b/Facepunch.Steamworks/Structs/SteamNetworking.cs index 0232250..02966f3 100644 --- a/Facepunch.Steamworks/Structs/SteamNetworking.cs +++ b/Facepunch.Steamworks/Structs/SteamNetworking.cs @@ -75,7 +75,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential )] public struct SteamNetworkingQuickConnectionStatus { - public SteamNetworkingConnectionState state; + public ConnectionState state; public int ping; public float connectionQualityLocal; public float connectionQualityRemote; diff --git a/Generator/Cleanup.cs b/Generator/Cleanup.cs index ef1cb07..ab791fd 100644 --- a/Generator/Cleanup.cs +++ b/Generator/Cleanup.cs @@ -35,6 +35,7 @@ public static class Cleanup type = type.Replace( "SteamNetworkingIPAddr", "NetworkAddress" ); type = type.Replace( "SteamNetworkingIdentity", "NetworkIdentity" ); type = type.Replace( "SteamNetConnectionInfo_t", "ConnectionInfo" ); + type = type.Replace( "SteamNetworkingConnectionState", "ConnectionState" ); return type; }