mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 05:58:07 +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();
|
var stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
|
string failed = null;
|
||||||
AuthResponse response = AuthResponse.AuthTicketInvalidAlreadyUsed;
|
AuthResponse response = AuthResponse.AuthTicketInvalidAlreadyUsed;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -63,12 +64,14 @@ namespace Steamworks
|
|||||||
finished = true;
|
finished = true;
|
||||||
response = rsponse;
|
response = rsponse;
|
||||||
|
|
||||||
Assert.AreEqual( steamid, clientSteamId );
|
if ( steamid == 0 )
|
||||||
Assert.AreEqual( steamid, ownerid );
|
failed = $"steamid is 0! {steamid} != {ownerid} ({rsponse})";
|
||||||
|
|
||||||
Console.WriteLine( "steamid: {0}", steamid );
|
if ( ownerid == 0 )
|
||||||
Console.WriteLine( "ownerid: {0}", ownerid );
|
failed = $"ownerid is 0! {steamid} != {ownerid} ({rsponse})";
|
||||||
Console.WriteLine( "status: {0}", response );
|
|
||||||
|
if ( steamid != ownerid )
|
||||||
|
failed = $"Steamid and Ownerid are different! {steamid} != {ownerid} ({rsponse})";
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -92,6 +95,9 @@ namespace Steamworks
|
|||||||
|
|
||||||
Assert.AreEqual( response, AuthResponse.OK );
|
Assert.AreEqual( response, AuthResponse.OK );
|
||||||
|
|
||||||
|
if ( failed != null )
|
||||||
|
Assert.Fail( failed );
|
||||||
|
|
||||||
finished = false;
|
finished = false;
|
||||||
stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||||
|
|
||||||
@ -113,7 +119,10 @@ namespace Steamworks
|
|||||||
await Task.Delay( 10 );
|
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;
|
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;
|
defaultPack = 4;
|
||||||
|
|
||||||
var isCallback = !string.IsNullOrEmpty( c.CallbackId );
|
var isCallback = !string.IsNullOrEmpty( c.CallbackId );
|
||||||
|
@ -68,7 +68,7 @@ namespace Generator
|
|||||||
case "uint16": return "ushort";
|
case "uint16": return "ushort";
|
||||||
case "const char *": return "string";
|
case "const char *": return "string";
|
||||||
case "_Bool": return "bool";
|
case "_Bool": return "bool";
|
||||||
case "CSteamID": return "ulong";
|
case "SteamId": return "ulong";
|
||||||
|
|
||||||
case "SteamAPIWarningMessageHook_t": return "IntPtr";
|
case "SteamAPIWarningMessageHook_t": return "IntPtr";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user