mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-03 09:10:41 +03:00
Seems like struct packing only changes with CSteamId if it's not the first field
This commit is contained in:
parent
53d86e7e3f
commit
08a4136a3e
@ -176,6 +176,9 @@ namespace Steamworks
|
||||
|
||||
var fields = t.GetFields( System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic );
|
||||
|
||||
if ( fields.Length == 0 )
|
||||
return "[no fields]";
|
||||
|
||||
var columnSize = fields.Max( x => x.Name.Length ) + 1;
|
||||
|
||||
if ( columnSize < 10 )
|
||||
|
@ -261,7 +261,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct AvatarImageLoaded_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamID; // m_steamID CSteamID
|
||||
@ -276,7 +276,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct ClanOfficerListResponse_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDClan; // m_steamIDClan CSteamID
|
||||
@ -290,7 +290,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct FriendRichPresenceUpdate_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDFriend; // m_steamIDFriend CSteamID
|
||||
@ -303,7 +303,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct GameRichPresenceJoinRequested_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDFriend; // m_steamIDFriend CSteamID
|
||||
@ -375,7 +375,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct JoinClanChatRoomCompletionResult_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDClanChat; // m_steamIDClanChat CSteamID
|
||||
@ -388,7 +388,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct GameConnectedFriendChatMsg_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDUser; // m_steamIDUser CSteamID
|
||||
@ -1467,7 +1467,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct UserStatsUnloaded_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDUser; // m_steamIDUser CSteamID
|
||||
@ -1479,7 +1479,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct UserAchievementIconFetched_t : ICallbackData
|
||||
{
|
||||
internal GameId GameID; // m_nGameID CGameID
|
||||
@ -1605,7 +1605,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct P2PSessionRequest_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDRemote; // m_steamIDRemote CSteamID
|
||||
@ -1617,7 +1617,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct P2PSessionConnectFail_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDRemote; // m_steamIDRemote CSteamID
|
||||
@ -2731,7 +2731,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct GSClientDeny_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamID; // m_SteamID CSteamID
|
||||
@ -2747,7 +2747,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct GSClientKick_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamID; // m_SteamID CSteamID
|
||||
@ -2894,7 +2894,7 @@ namespace Steamworks.Data
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct GSStatsUnloaded_t : ICallbackData
|
||||
{
|
||||
internal ulong SteamIDUser; // m_steamIDUser CSteamID
|
||||
|
@ -88,7 +88,7 @@ namespace Steamworks.Data
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct LeaderboardEntry_t
|
||||
{
|
||||
internal ulong SteamIDUser; // m_steamIDUser CSteamID
|
||||
|
@ -106,10 +106,10 @@ namespace Generator
|
||||
// 4/8 packing is irrevant to these classes
|
||||
if ( Name.Contains( "MatchMakingKeyValuePair_t" ) ) return true;
|
||||
|
||||
if ( Fields.Any( x => x.Type.Contains( "CSteamID" ) ) )
|
||||
if ( Fields.Skip( 1 ).Any( x => x.Type.Contains( "CSteamID" ) ) )
|
||||
return true;
|
||||
|
||||
if ( Fields.Any( x => x.Type.Contains( "CGameID" ) ) )
|
||||
if ( Fields.Skip( 1 ).Any( x => x.Type.Contains( "CGameID" ) ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user