diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs index 71b9bab..86a3803 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs @@ -101,7 +101,7 @@ namespace Steamworks internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer ) { var returnValue = _GetServerDetails( Self, hRequest, iServer ); - return gameserveritem_t.Fill( returnValue ); + return (gameserveritem_t) Marshal.PtrToStructure( returnValue, typeof( gameserveritem_t ) ); } #region FunctionMeta diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs index 2f176b5..eb798c9 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs @@ -25,7 +25,7 @@ namespace Steamworks internal NetMsg AllocateMessage( int cbAllocateBuffer ) { var returnValue = _AllocateMessage( Self, cbAllocateBuffer ); - return NetMsg.Fill( returnValue ); + return (NetMsg) Marshal.PtrToStructure( returnValue, typeof( NetMsg ) ); } #region FunctionMeta diff --git a/Generator/CodeWriter/Types/BaseType.cs b/Generator/CodeWriter/Types/BaseType.cs index 4bc1752..8a23561 100644 --- a/Generator/CodeWriter/Types/BaseType.cs +++ b/Generator/CodeWriter/Types/BaseType.cs @@ -143,7 +143,7 @@ internal class StructType : BaseType { if ( NativeType.EndsWith( "*" ) ) { - return $"return {TypeName}.Fill( {varname} );"; + return $"return ({TypeName}) Marshal.PtrToStructure( {varname}, typeof( {TypeName} ) );"; } return base.Return( varname );