mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 14:45:51 +03:00
Call SetupInterface on startup
This commit is contained in:
parent
4daf43891a
commit
ead761fe04
@ -11,6 +11,12 @@ internal class ISteamApps : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamApps();
|
||||
|
||||
|
||||
internal ISteamApps()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamFriends : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamFriends();
|
||||
|
||||
|
||||
internal ISteamFriends()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName")]
|
||||
private static extern Utf8StringPointer _GetPersonaName( IntPtr self );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamGameServer : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamGameServer();
|
||||
|
||||
|
||||
internal ISteamGameServer()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_InitGameServer")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamGameServerStats : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamGameServerStats();
|
||||
|
||||
|
||||
internal ISteamGameServerStats()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats")]
|
||||
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamInput : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamInput();
|
||||
|
||||
|
||||
internal ISteamInput()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamInventory : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamInventory();
|
||||
|
||||
|
||||
internal ISteamInventory()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus")]
|
||||
private static extern Result _GetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamMatchmaking : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamMatchmaking();
|
||||
|
||||
|
||||
internal ISteamMatchmaking()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount")]
|
||||
private static extern int _GetFavoriteGameCount( IntPtr self );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamMatchmakingServers : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamMatchmakingServers();
|
||||
|
||||
|
||||
internal ISteamMatchmakingServers()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestInternetServerList")]
|
||||
private static extern HServerListRequest _RequestInternetServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamMusic : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamMusic();
|
||||
|
||||
|
||||
internal ISteamMusic()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsEnabled")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamNetworking : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamNetworking();
|
||||
|
||||
|
||||
internal ISteamNetworking()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,5 +11,11 @@ internal class ISteamNetworkingSockets : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamNetworkingSockets();
|
||||
|
||||
|
||||
internal ISteamNetworkingSockets()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -11,5 +11,11 @@ internal class ISteamNetworkingUtils : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamNetworkingUtils();
|
||||
|
||||
|
||||
internal ISteamNetworkingUtils()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamParentalSettings : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamParentalSettings();
|
||||
|
||||
|
||||
internal ISteamParentalSettings()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamParties : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamParties();
|
||||
|
||||
|
||||
internal ISteamParties()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons")]
|
||||
private static extern uint _GetNumActiveBeacons( IntPtr self );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamRemoteStorage : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamRemoteStorage();
|
||||
|
||||
|
||||
internal ISteamRemoteStorage()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamScreenshots : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamScreenshots();
|
||||
|
||||
|
||||
internal ISteamScreenshots()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_WriteScreenshot")]
|
||||
private static extern ScreenshotHandle _WriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamUGC : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamUGC();
|
||||
|
||||
|
||||
internal ISteamUGC()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest")]
|
||||
private static extern UGCQueryHandle_t _CreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamUser : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamUser();
|
||||
|
||||
|
||||
internal ISteamUser()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser")]
|
||||
private static extern HSteamUser _GetHSteamUser( IntPtr self );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamUserStats : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamUserStats();
|
||||
|
||||
|
||||
internal ISteamUserStats()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats")]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamUtils : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamUtils();
|
||||
|
||||
|
||||
internal ISteamUtils()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive")]
|
||||
private static extern uint _GetSecondsSinceAppActive( IntPtr self );
|
||||
|
@ -11,6 +11,12 @@ internal class ISteamVideo : SteamInterface
|
||||
{
|
||||
public override IntPtr GetInterfacePointer() => GetApi.SteamVideo();
|
||||
|
||||
|
||||
internal ISteamVideo()
|
||||
{
|
||||
SetupInterface();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL")]
|
||||
private static extern void _GetVideoURL( IntPtr self, AppId unVideoAppID );
|
||||
|
@ -27,6 +27,13 @@ public void GenerateVTableClass( string className, string filename )
|
||||
{
|
||||
WriteLine( $"public override IntPtr GetInterfacePointer() => GetApi.{className.Substring( 1 )}();" );
|
||||
WriteLine();
|
||||
WriteLine();
|
||||
StartBlock( $"internal {className}()" );
|
||||
{
|
||||
WriteLine( $"SetupInterface();" );
|
||||
}
|
||||
EndBlock();
|
||||
WriteLine();
|
||||
|
||||
var functions = def.methods.Where( x => x.ClassName == className );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user