(965c31410a) Unstable v0.10.4.0

This commit is contained in:
Juan Pablo Arce
2020-07-21 08:57:50 -03:00
parent 4f8bd39789
commit 33d3a41104
546 changed files with 45952 additions and 25762 deletions
@@ -10,33 +10,20 @@ namespace Steamworks
/// <summary>
/// Undocumented Parental Settings
/// </summary>
public static class SteamScreenshots
public class SteamScreenshots : SteamClientClass<SteamScreenshots>
{
static ISteamScreenshots _internal;
internal static ISteamScreenshots Internal
{
get
{
SteamClient.ValidCheck();
internal static ISteamScreenshots Internal => Interface as ISteamScreenshots;
if ( _internal == null )
{
_internal = new ISteamScreenshots();
_internal.Init();
}
return _internal;
}
}
internal static void Shutdown()
internal override void InitializeInterface( bool server )
{
_internal = null;
SetInterface( server, new ISteamScreenshots( server ) );
InstallEvents();
}
internal static void InstallEvents()
{
ScreenshotRequested_t.Install( x => OnScreenshotRequested?.Invoke() );
ScreenshotReady_t.Install( x =>
Dispatch.Install<ScreenshotRequested_t>( x => OnScreenshotRequested?.Invoke() );
Dispatch.Install<ScreenshotReady_t>( x =>
{
if ( x.Result != Result.OK )
OnScreenshotFailed?.Invoke( x.Result );
@@ -47,7 +34,7 @@ namespace Steamworks
/// <summary>
/// A screenshot has been requested by the user from the Steam screenshot hotkey.
/// This will only be called if HookScreenshots has been enabled, in which case Steam
/// This will only be called if Hooked is true, in which case Steam
/// will not take the screenshot itself.
/// </summary>
public static event Action OnScreenshotRequested;