From 5890fea9e652b75a3618d3a7a226ae09ef5af5fb Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Thu, 6 Jul 2017 10:05:23 +0100 Subject: [PATCH] Added SteamAPI_RestartAppIfNecessary to missing --- .../SteamNative.Platform.Interface.cs | 1 + .../SteamNative/SteamNative.Platform.Linux32.cs | 5 +++++ .../SteamNative/SteamNative.Platform.Linux64.cs | 5 +++++ .../SteamNative/SteamNative.Platform.Mac.cs | 5 +++++ .../SteamNative/SteamNative.Platform.Win32.cs | 5 +++++ .../SteamNative/SteamNative.Platform.Win64.cs | 5 +++++ .../SteamNative/SteamNative.SteamApi.cs | 6 ++++++ Generator/steam_api_missing.json | 16 +++++++++++++++- 8 files changed, 47 insertions(+), 1 deletion(-) diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs index c08b33b..b4720a8 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs @@ -686,6 +686,7 @@ internal interface Interface : IDisposable HSteamUser /*(HSteamUser)*/ SteamApi_SteamGameServer_GetHSteamUser(); HSteamPipe /*(HSteamPipe)*/ SteamApi_SteamGameServer_GetHSteamPipe(); IntPtr /*void **/ SteamApi_SteamInternal_CreateInterface( string /*const char **/ version ); + bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ); } } } diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux32.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux32.cs index 58d96a6..9184e4c 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux32.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux32.cs @@ -4103,6 +4103,10 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction { return Native.SteamInternal_CreateInterface(version); } + public virtual bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ) + { + return Native.SteamAPI_RestartAppIfNecessary(unOwnAppID); + } internal static unsafe class Native { @@ -4876,6 +4880,7 @@ internal static unsafe class Native [DllImportAttribute( "libsteam_api.so" )] internal static extern HSteamUser /*(HSteamUser)*/ SteamGameServer_GetHSteamUser(); [DllImportAttribute( "libsteam_api.so" )] internal static extern HSteamPipe /*(HSteamPipe)*/ SteamGameServer_GetHSteamPipe(); [DllImportAttribute( "libsteam_api.so" )] internal static extern IntPtr /*void **/ SteamInternal_CreateInterface( string /*const char **/ version ); + [DllImportAttribute( "libsteam_api.so" )] internal static extern bool /*bool*/ SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ); } } diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs index 035991a..7884753 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs @@ -4103,6 +4103,10 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction { return Native.SteamInternal_CreateInterface(version); } + public virtual bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ) + { + return Native.SteamAPI_RestartAppIfNecessary(unOwnAppID); + } internal static unsafe class Native { @@ -4876,6 +4880,7 @@ internal static unsafe class Native [DllImportAttribute( "libsteam_api64.so" )] internal static extern HSteamUser /*(HSteamUser)*/ SteamGameServer_GetHSteamUser(); [DllImportAttribute( "libsteam_api64.so" )] internal static extern HSteamPipe /*(HSteamPipe)*/ SteamGameServer_GetHSteamPipe(); [DllImportAttribute( "libsteam_api64.so" )] internal static extern IntPtr /*void **/ SteamInternal_CreateInterface( string /*const char **/ version ); + [DllImportAttribute( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ); } } diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs index 79219fc..499b86c 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs @@ -4103,6 +4103,10 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction { return Native.SteamInternal_CreateInterface(version); } + public virtual bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ) + { + return Native.SteamAPI_RestartAppIfNecessary(unOwnAppID); + } internal static unsafe class Native { @@ -4876,6 +4880,7 @@ internal static unsafe class Native [DllImportAttribute( "libsteam_api.dylib" )] internal static extern HSteamUser /*(HSteamUser)*/ SteamGameServer_GetHSteamUser(); [DllImportAttribute( "libsteam_api.dylib" )] internal static extern HSteamPipe /*(HSteamPipe)*/ SteamGameServer_GetHSteamPipe(); [DllImportAttribute( "libsteam_api.dylib" )] internal static extern IntPtr /*void **/ SteamInternal_CreateInterface( string /*const char **/ version ); + [DllImportAttribute( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ); } } diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win32.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win32.cs index 019023a..084d6d2 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win32.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win32.cs @@ -4069,6 +4069,10 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction { return Native.SteamInternal_CreateInterface(version); } + public virtual bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ) + { + return Native.SteamAPI_RestartAppIfNecessary(unOwnAppID); + } internal static unsafe class Native { @@ -4842,6 +4846,7 @@ internal static unsafe class Native [DllImportAttribute( "steam_api.dll" )] internal static extern HSteamUser /*(HSteamUser)*/ SteamGameServer_GetHSteamUser(); [DllImportAttribute( "steam_api.dll" )] internal static extern HSteamPipe /*(HSteamPipe)*/ SteamGameServer_GetHSteamPipe(); [DllImportAttribute( "steam_api.dll" )] internal static extern IntPtr /*void **/ SteamInternal_CreateInterface( string /*const char **/ version ); + [DllImportAttribute( "steam_api.dll" )] internal static extern bool /*bool*/ SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ); } } diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs index 1f3662b..34f6957 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs @@ -4069,6 +4069,10 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction { return Native.SteamInternal_CreateInterface(version); } + public virtual bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ) + { + return Native.SteamAPI_RestartAppIfNecessary(unOwnAppID); + } internal static unsafe class Native { @@ -4842,6 +4846,7 @@ internal static unsafe class Native [DllImportAttribute( "steam_api64.dll" )] internal static extern HSteamUser /*(HSteamUser)*/ SteamGameServer_GetHSteamUser(); [DllImportAttribute( "steam_api64.dll" )] internal static extern HSteamPipe /*(HSteamPipe)*/ SteamGameServer_GetHSteamPipe(); [DllImportAttribute( "steam_api64.dll" )] internal static extern IntPtr /*void **/ SteamInternal_CreateInterface( string /*const char **/ version ); + [DllImportAttribute( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID ); } } diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamApi.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamApi.cs index c4cecd9..026bfa5 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamApi.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamApi.cs @@ -73,6 +73,12 @@ public void SteamAPI_RegisterCallResult( IntPtr pCallback /*void **/, SteamAPICa platform.SteamApi_SteamAPI_RegisterCallResult( (IntPtr) pCallback, callback.Value ); } + // bool + public bool SteamAPI_RestartAppIfNecessary( uint unOwnAppID /*uint32*/ ) + { + return platform.SteamApi_SteamAPI_RestartAppIfNecessary( unOwnAppID ); + } + // void public void SteamAPI_RunCallbacks() { diff --git a/Generator/steam_api_missing.json b/Generator/steam_api_missing.json index 28b55b4..3a6a43e 100644 --- a/Generator/steam_api_missing.json +++ b/Generator/steam_api_missing.json @@ -210,6 +210,20 @@ paramtype: "const char *" } ], - } + }, + + { + NeedsSelfPointer: false, + classname: "SteamApi", + methodname: "SteamAPI_RestartAppIfNecessary", + returntype: "bool", + params: + [ + { + paramname: "unOwnAppID", + paramtype: "uint32" + } + ], + }, ] } \ No newline at end of file