Manual create SteamNetworkingErrMsg

This commit is contained in:
Garry Newman 2020-02-12 16:25:25 +00:00
parent eaac5cac20
commit e8dd99f6ed
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,11 @@
using Steamworks.Data;
namespace Steamworks.Data
{
internal unsafe struct SteamNetworkingErrMsg
{
public fixed char Value[1024];
}
}

View File

@ -69,7 +69,6 @@ public static class Cleanup
if ( type == "MatchMakingKeyValuePair" ) return false; if ( type == "MatchMakingKeyValuePair" ) return false;
if ( type == "Connection" ) return false; if ( type == "Connection" ) return false;
if ( type == "Socket" ) return false; if ( type == "Socket" ) return false;
if ( type == "SteamNetworkingErrMsg" ) return false;
if ( type == "SteamNetworkingMicroseconds" ) return false; if ( type == "SteamNetworkingMicroseconds" ) return false;
if ( type == "FSteamNetworkingSocketsDebugOutput" ) return false; if ( type == "FSteamNetworkingSocketsDebugOutput" ) return false;
if ( type == "NetMsg" ) return false; if ( type == "NetMsg" ) return false;
@ -79,6 +78,7 @@ public static class Cleanup
if ( type == "NetAddress" ) return false; if ( type == "NetAddress" ) return false;
if ( type == "NetIdentity" ) return false; if ( type == "NetIdentity" ) return false;
if ( type == "SteamNetworkingQuickConnectionStatus" ) return false; if ( type == "SteamNetworkingQuickConnectionStatus" ) return false;
if ( type == "SteamNetworkingErrMsg" ) return false;
return true; return true;
} }

View File

@ -54,7 +54,15 @@ namespace Generator
StartBlock( $"{Cleanup.Expose( typeName )} struct {typeName} : IEquatable<{typeName}>, IComparable<{typeName}>" ); StartBlock( $"{Cleanup.Expose( typeName )} struct {typeName} : IEquatable<{typeName}>, IComparable<{typeName}>" );
{ {
WriteLine( $"// Name: {o.Name}, Type: {o.Type}" ); WriteLine( $"// Name: {o.Name}, Type: {o.Type}" );
if ( o.Type == "char [1024]" )
{
WriteLine( $"public fixed char[1024] Value;" );
}
else
{
WriteLine( $"public {ToManagedType( o.Type )} Value;" ); WriteLine( $"public {ToManagedType( o.Type )} Value;" );
}
WriteLine(); WriteLine();
WriteLine( $"public static implicit operator {typeName}( {ToManagedType( o.Type )} value ) => new {typeName}(){{ Value = value }};" ); WriteLine( $"public static implicit operator {typeName}( {ToManagedType( o.Type )} value ) => new {typeName}(){{ Value = value }};" );
WriteLine( $"public static implicit operator {ToManagedType( o.Type )}( {typeName} value ) => value.Value;" ); WriteLine( $"public static implicit operator {ToManagedType( o.Type )}( {typeName} value ) => value.Value;" );