Fixed uint32 arrays using the wrong size marshalling

This commit is contained in:
Garry Newman 2018-01-23 11:02:36 +00:00
parent 59f7e0ca0a
commit 8d202b4645
2 changed files with 5 additions and 5 deletions

View File

@ -10262,7 +10262,7 @@ internal struct RemoteStorageEnumerateUserSubscribedFilesResult_t
public int TotalResultCount; // m_nTotalResultCount int32
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
public ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)]
public uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50]
//
@ -10282,7 +10282,7 @@ internal struct PackSmall
public int TotalResultCount; // m_nTotalResultCount int32
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
public ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)]
public uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50]
//
@ -13655,7 +13655,7 @@ internal struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t
public int TotalResultCount; // m_nTotalResultCount int32
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
public ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)]
public uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50]
//
@ -13676,7 +13676,7 @@ internal struct PackSmall
public int TotalResultCount; // m_nTotalResultCount int32
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
public ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)]
public uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50]
//

View File

@ -177,7 +177,7 @@ private void StructFields( SteamApiDefinition.StructDef.StructFields[] fields )
{
var num = t.Replace( "uint32", "" ).Trim( '[', ']', ' ' );
t = $"uint[]";
WriteLine( $"[MarshalAs(UnmanagedType.ByValArray, SizeConst = {num}, ArraySubType = UnmanagedType.U8)]" );
WriteLine( $"[MarshalAs(UnmanagedType.ByValArray, SizeConst = {num}, ArraySubType = UnmanagedType.U4)]" );
}
if ( t.StartsWith( "float " ) && t.Contains( "[" ) )