mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 06:38:01 +03:00
64bit working
This commit is contained in:
parent
15d1d8a0df
commit
b206eb88a2
BIN
Facepunch.Steamworks.Test/bin/Debug/FacepunchSteamworksApi32.dll
Normal file
BIN
Facepunch.Steamworks.Test/bin/Debug/FacepunchSteamworksApi32.dll
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks.Test/bin/Debug/FacepunchSteamworksApi64.dll
Normal file
BIN
Facepunch.Steamworks.Test/bin/Debug/FacepunchSteamworksApi64.dll
Normal file
Binary file not shown.
@ -12,7 +12,7 @@ namespace Facepunch.Steamworks
|
|||||||
public class Request : IDisposable
|
public class Request : IDisposable
|
||||||
{
|
{
|
||||||
internal Client client;
|
internal Client client;
|
||||||
internal uint Id;
|
internal IntPtr Id;
|
||||||
|
|
||||||
private IntPtr m_pVTable;
|
private IntPtr m_pVTable;
|
||||||
private GCHandle m_pGCHandle;
|
private GCHandle m_pGCHandle;
|
||||||
@ -133,12 +133,12 @@ namespace Facepunch.Steamworks
|
|||||||
//
|
//
|
||||||
// Cancel the query if it's still running
|
// Cancel the query if it's still running
|
||||||
//
|
//
|
||||||
if ( !Finished && Id > 0 )
|
if ( !Finished && Id != IntPtr.Zero )
|
||||||
{
|
{
|
||||||
if ( client.Valid )
|
if ( client.Valid )
|
||||||
client._servers.CancelQuery( Id );
|
client._servers.CancelQuery( Id );
|
||||||
|
|
||||||
Id = 0;
|
Id = IntPtr.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -156,16 +156,16 @@ namespace Facepunch.Steamworks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Complete( IntPtr thisptr, uint RequestId, int response )
|
private void Complete( IntPtr thisptr, IntPtr RequestId, int response )
|
||||||
{
|
{
|
||||||
if ( RequestId != Id )
|
if ( RequestId != Id )
|
||||||
throw new Exception( "Request ID is invalid!" );
|
throw new Exception( "Request ID is invalid!" );
|
||||||
|
|
||||||
Finished = true;
|
Finished = true;
|
||||||
Id = 0;
|
Id = IntPtr.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NonResponsive( IntPtr thisptr, uint RequestId, int iServer )
|
private void NonResponsive( IntPtr thisptr, IntPtr RequestId, int iServer )
|
||||||
{
|
{
|
||||||
if ( RequestId != Id )
|
if ( RequestId != Id )
|
||||||
throw new Exception( "Request ID is invalid!" );
|
throw new Exception( "Request ID is invalid!" );
|
||||||
@ -174,13 +174,15 @@ namespace Facepunch.Steamworks
|
|||||||
Unresponsive.Add( Server.FromSteam( info ) );
|
Unresponsive.Add( Server.FromSteam( info ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnServerResponded( IntPtr thisptr, uint RequestId, int iServer )
|
private void OnServerResponded( IntPtr thisptr, IntPtr RequestId, int iServer )
|
||||||
{
|
{
|
||||||
if ( RequestId != Id )
|
if ( RequestId != Id )
|
||||||
throw new Exception( "Request ID is invalid!" );
|
throw new Exception( "Request ID is invalid!" );
|
||||||
|
|
||||||
var info = client._servers.GetServerDetails( Id, iServer );
|
var info = client._servers.GetServerDetails( Id, iServer );
|
||||||
Responded.Add( Server.FromSteam( info ) );
|
Responded.Add( Server.FromSteam( info ) );
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.WriteLine( info.m_szServerName );
|
||||||
}
|
}
|
||||||
|
|
||||||
internal IntPtr GetVTablePointer()
|
internal IntPtr GetVTablePointer()
|
||||||
@ -192,11 +194,11 @@ namespace Facepunch.Steamworks
|
|||||||
internal class VTable
|
internal class VTable
|
||||||
{
|
{
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||||
internal delegate void InternalServerResponded( IntPtr thisptr, uint hRequest, int iServer );
|
internal delegate void InternalServerResponded( IntPtr thisptr, IntPtr hRequest, int iServer );
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||||
internal delegate void InternalServerFailedToRespond( IntPtr thisptr, uint hRequest, int iServer );
|
internal delegate void InternalServerFailedToRespond( IntPtr thisptr, IntPtr hRequest, int iServer );
|
||||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||||
internal delegate void InternalRefreshComplete( IntPtr thisptr, uint hRequest, int response );
|
internal delegate void InternalRefreshComplete( IntPtr thisptr, IntPtr hRequest, int response );
|
||||||
|
|
||||||
[NonSerialized, MarshalAs(UnmanagedType.FunctionPtr)]
|
[NonSerialized, MarshalAs(UnmanagedType.FunctionPtr)]
|
||||||
internal InternalServerResponded responded;
|
internal InternalServerResponded responded;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user