mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 14:15:47 +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();
|
Username = native.friends.GetPersonaName();
|
||||||
SteamId = native.user.GetSteamID();
|
SteamId = native.user.GetSteamID();
|
||||||
BetaName = native.apps.GetCurrentBetaName();
|
BetaName = native.apps.GetCurrentBetaName();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Run update, first call does some initialization
|
||||||
|
//
|
||||||
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
@ -183,10 +188,15 @@ public bool Valid
|
|||||||
|
|
||||||
internal Action InstallCallback( int type, Delegate action )
|
internal Action InstallCallback( int type, Delegate action )
|
||||||
{
|
{
|
||||||
var ptr = Marshal.GetFunctionPointerForDelegate( action );
|
var del = Marshal.GetFunctionPointerForDelegate( action );
|
||||||
Valve.Steamworks.SteamAPI.RegisterCallback( ptr, type );
|
|
||||||
|
|
||||||
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