SteamNetworkingConnectionState => ConnectionState

This commit is contained in:
Garry Newman 2019-05-03 10:44:48 +01:00
parent ea0f19ff8e
commit 4ed8a4250b
5 changed files with 8 additions and 5 deletions

View File

@ -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.

View File

@ -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, };
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;
}