mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 14:08:06 +03:00
Callback vtable uses #ifdef
This commit is contained in:
parent
f53e1aaba0
commit
4cef345d95
@ -79,18 +79,16 @@ namespace Steamworks
|
|||||||
|
|
||||||
var vt = Marshal.AllocHGlobal( IntPtr.Size * 3 );
|
var vt = Marshal.AllocHGlobal( IntPtr.Size * 3 );
|
||||||
|
|
||||||
if ( Config.Os == OsType.Windows )
|
// Windows switches the function positions
|
||||||
{
|
#if PLATFORM_WIN
|
||||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 0, b );
|
Marshal.WriteIntPtr( vt, IntPtr.Size * 0, b );
|
||||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 1, a );
|
Marshal.WriteIntPtr( vt, IntPtr.Size * 1, a );
|
||||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
|
Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
|
||||||
}
|
#else
|
||||||
else
|
Marshal.WriteIntPtr( vt, IntPtr.Size * 0, a );
|
||||||
{
|
Marshal.WriteIntPtr( vt, IntPtr.Size * 1, b );
|
||||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 0, a );
|
Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
|
||||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 1, b );
|
#endif
|
||||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
|
|
||||||
}
|
|
||||||
|
|
||||||
return vt;
|
return vt;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user