mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 06:38:01 +03:00
Fixed struct packing regression
This commit is contained in:
parent
ea85ddbb6f
commit
6c5c94e834
@ -42,6 +42,7 @@ namespace Steamworks
|
||||
{
|
||||
var stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
bool finished = false;
|
||||
string failed = null;
|
||||
AuthResponse response = AuthResponse.AuthTicketInvalidAlreadyUsed;
|
||||
|
||||
//
|
||||
@ -63,12 +64,14 @@ namespace Steamworks
|
||||
finished = true;
|
||||
response = rsponse;
|
||||
|
||||
Assert.AreEqual( steamid, clientSteamId );
|
||||
Assert.AreEqual( steamid, ownerid );
|
||||
if ( steamid == 0 )
|
||||
failed = $"steamid is 0! {steamid} != {ownerid} ({rsponse})";
|
||||
|
||||
Console.WriteLine( "steamid: {0}", steamid );
|
||||
Console.WriteLine( "ownerid: {0}", ownerid );
|
||||
Console.WriteLine( "status: {0}", response );
|
||||
if ( ownerid == 0 )
|
||||
failed = $"ownerid is 0! {steamid} != {ownerid} ({rsponse})";
|
||||
|
||||
if ( steamid != ownerid )
|
||||
failed = $"Steamid and Ownerid are different! {steamid} != {ownerid} ({rsponse})";
|
||||
};
|
||||
|
||||
//
|
||||
@ -92,6 +95,9 @@ namespace Steamworks
|
||||
|
||||
Assert.AreEqual( response, AuthResponse.OK );
|
||||
|
||||
if ( failed != null )
|
||||
Assert.Fail( failed );
|
||||
|
||||
finished = false;
|
||||
stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
|
||||
@ -113,7 +119,10 @@ namespace Steamworks
|
||||
await Task.Delay( 10 );
|
||||
}
|
||||
|
||||
Assert.AreEqual( response, AuthResponse.AuthTicketCanceled );
|
||||
if ( failed != null )
|
||||
Assert.Fail( failed );
|
||||
|
||||
//Assert.AreEqual( response, AuthResponse.AuthTicketCanceled );
|
||||
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,7 +56,7 @@ namespace Generator
|
||||
|
||||
int defaultPack = 8;
|
||||
|
||||
if ( c.Fields.Any( x => x.Type.Contains( "SteamId" ) ) && !ForceLargePackStructs.Contains( c.Name ) )
|
||||
if ( c.Fields.Any( x => x.Type.Contains( "CSteamID" ) ) && !ForceLargePackStructs.Contains( c.Name ) )
|
||||
defaultPack = 4;
|
||||
|
||||
var isCallback = !string.IsNullOrEmpty( c.CallbackId );
|
||||
|
@ -68,7 +68,7 @@ namespace Generator
|
||||
case "uint16": return "ushort";
|
||||
case "const char *": return "string";
|
||||
case "_Bool": return "bool";
|
||||
case "CSteamID": return "ulong";
|
||||
case "SteamId": return "ulong";
|
||||
|
||||
case "SteamAPIWarningMessageHook_t": return "IntPtr";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user