From 7f4e0567a651d15e1e22e487d402fb5be05cfcab Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Tue, 25 Jun 2019 12:47:22 +0100 Subject: [PATCH] Swap overloaded function address on both win32 and win64 --- .../Generated/Interfaces/ISteamGameServerStats.cs | 2 +- Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs | 2 +- Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs | 2 +- Generator/CodeWriter/ClassVTable.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs index 1bfa799..c2b275a 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs @@ -20,7 +20,7 @@ public override void InitInternals() _ClearUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); _StoreUserStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - #if PLATFORM_WIN64 + #if PLATFORM_WIN _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); _SetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs index 5dd7640..7afa2dd 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs @@ -88,7 +88,7 @@ public override void InitInternals() _GetAppDependencies = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 592 ) ) ); _DeleteItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 600 ) ) ); - #if PLATFORM_WIN64 + #if PLATFORM_WIN _CreateQueryAllUGCRequest1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); _CreateQueryAllUGCRequest2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); #else diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs index f18600d..66442fb 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs @@ -47,7 +47,7 @@ public override void InitInternals() _GetAchievementAchievedPercent = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) ); _RequestGlobalStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) ); - #if PLATFORM_WIN64 + #if PLATFORM_WIN _GetStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); _GetStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); _SetStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); diff --git a/Generator/CodeWriter/ClassVTable.cs b/Generator/CodeWriter/ClassVTable.cs index 09dc289..af97e27 100644 --- a/Generator/CodeWriter/ClassVTable.cs +++ b/Generator/CodeWriter/ClassVTable.cs @@ -118,7 +118,7 @@ void WriteFunctionPointerReader( CodeParser.Class clss ) if ( different.Count > 0 ) { WriteLine( "" ); - WriteLine( "#if PLATFORM_WIN64" ); + WriteLine( "#if PLATFORM_WIN" ); foreach ( var i in different ) { var func = clss.Functions[i];