Callback vtable uses #ifdef

This commit is contained in:
Garry Newman 2019-06-25 12:13:30 +01:00
parent f53e1aaba0
commit 4cef345d95

View File

@ -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;
} }