mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
This callback code is bullshit
This commit is contained in:
parent
503e0529c0
commit
3a9c1962a1
@ -135,6 +135,11 @@ public Client( uint appId )
|
||||
Username = native.friends.GetPersonaName();
|
||||
SteamId = native.user.GetSteamID();
|
||||
BetaName = native.apps.GetCurrentBetaName();
|
||||
|
||||
//
|
||||
// Run update, first call does some initialization
|
||||
//
|
||||
Update();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@ -183,10 +188,15 @@ public bool Valid
|
||||
|
||||
internal Action InstallCallback( int type, Delegate action )
|
||||
{
|
||||
var ptr = Marshal.GetFunctionPointerForDelegate( action );
|
||||
Valve.Steamworks.SteamAPI.RegisterCallback( ptr, type );
|
||||
var del = Marshal.GetFunctionPointerForDelegate( action );
|
||||
|
||||
return () => Valve.Steamworks.SteamAPI.UnregisterCallback( ptr );
|
||||
// var ptr = Marshal.GetFunctionPointerForDelegate( action );
|
||||
// Valve.Steamworks.SteamAPI.RegisterCallback( del, type );
|
||||
|
||||
// Valve.Steamworks.SteamAPI.UnregisterCallback( del );
|
||||
|
||||
//return () => Valve.Steamworks.SteamAPI.UnregisterCallback( ptr );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user