mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 22:58:01 +03:00
Manual create SteamNetworkingErrMsg
This commit is contained in:
parent
eaac5cac20
commit
e8dd99f6ed
11
Facepunch.Steamworks/Structs/SteamNetworkingErrMsg.cs
Normal file
11
Facepunch.Steamworks/Structs/SteamNetworkingErrMsg.cs
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
|
||||
internal unsafe struct SteamNetworkingErrMsg
|
||||
{
|
||||
public fixed char Value[1024];
|
||||
}
|
||||
}
|
@ -69,7 +69,6 @@ public static class Cleanup
|
||||
if ( type == "MatchMakingKeyValuePair" ) return false;
|
||||
if ( type == "Connection" ) return false;
|
||||
if ( type == "Socket" ) return false;
|
||||
if ( type == "SteamNetworkingErrMsg" ) return false;
|
||||
if ( type == "SteamNetworkingMicroseconds" ) return false;
|
||||
if ( type == "FSteamNetworkingSocketsDebugOutput" ) return false;
|
||||
if ( type == "NetMsg" ) return false;
|
||||
@ -79,6 +78,7 @@ public static class Cleanup
|
||||
if ( type == "NetAddress" ) return false;
|
||||
if ( type == "NetIdentity" ) return false;
|
||||
if ( type == "SteamNetworkingQuickConnectionStatus" ) return false;
|
||||
if ( type == "SteamNetworkingErrMsg" ) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -54,7 +54,15 @@ namespace Generator
|
||||
StartBlock( $"{Cleanup.Expose( typeName )} struct {typeName} : IEquatable<{typeName}>, IComparable<{typeName}>" );
|
||||
{
|
||||
WriteLine( $"// Name: {o.Name}, Type: {o.Type}" );
|
||||
WriteLine( $"public {ToManagedType( o.Type )} Value;" );
|
||||
|
||||
if ( o.Type == "char [1024]" )
|
||||
{
|
||||
WriteLine( $"public fixed char[1024] Value;" );
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteLine( $"public {ToManagedType( o.Type )} Value;" );
|
||||
}
|
||||
WriteLine();
|
||||
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;" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user