This commit is contained in:
Garry Newman 2016-10-26 16:47:12 +01:00
parent b91b22a983
commit 6ef86c3cb8
2 changed files with 7 additions and 7 deletions

View File

@ -28,14 +28,14 @@ internal bool InitClient()
{ {
api = new SteamNative.SteamApi( (IntPtr) 1 ); api = new SteamNative.SteamApi( (IntPtr) 1 );
if ( !api.SteamAPI_Init() )
return false;
var user = api.SteamAPI_GetHSteamUser(); var user = api.SteamAPI_GetHSteamUser();
var pipe = api.SteamAPI_GetHSteamPipe(); var pipe = api.SteamAPI_GetHSteamPipe();
if ( pipe == 0 ) if ( pipe == 0 )
return false; return false;
if ( !api.SteamAPI_Init() )
return false;
FillInterfaces( user, pipe ); FillInterfaces( user, pipe );
return true; return true;

View File

@ -37,10 +37,10 @@ public Server( uint appId, uint IpAddress, ushort GamePort, ushort QueryPort, bo
// //
// Set up warning hook callback // Set up warning hook callback
// //
SteamAPIWarningMessageHook ptr = InternalOnWarning; // SteamAPIWarningMessageHook ptr = InternalOnWarning;
var d = Marshal.GetFunctionPointerForDelegate( ptr ); // var d = Marshal.GetFunctionPointerForDelegate( ptr );
var rr = GCHandle.Alloc( d ); // var rr = GCHandle.Alloc( d );
native.utils.SetWarningMessageHook( d ); // native.utils.SetWarningMessageHook( d );
// //
// Setup interfaces that client and server both have // Setup interfaces that client and server both have