Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -14,11 +14,14 @@ namespace Steamworks
{
internal static ISteamRemotePlay? Internal => Interface as ISteamRemotePlay;
internal override void InitializeInterface( bool server )
internal override bool InitializeInterface( bool server )
{
SetInterface( server, new ISteamRemotePlay( server ) );
if ( Interface is null || Interface.Self == IntPtr.Zero ) return false;
InstallEvents( server );
return true;
}
internal void InstallEvents( bool server )
@@ -28,30 +31,30 @@ namespace Steamworks
}
/// <summary>
/// Called when a session is connected
/// Invoked when a session is connected.
/// </summary>
public static event Action<RemotePlaySession>? OnSessionConnected;
/// <summary>
/// Called when a session becomes disconnected
/// Invoked when a session becomes disconnected.
/// </summary>
public static event Action<RemotePlaySession>? OnSessionDisconnected;
/// <summary>
/// Get the number of currently connected Steam Remote Play sessions
/// Gets the number of currently connected Steam Remote Play sessions
/// </summary>
public static int SessionCount => (int)(Internal?.GetSessionCount() ?? 0);
/// <summary>
/// Get the currently connected Steam Remote Play session ID at the specified index.
/// IsValid will return false if it's out of bounds
/// IsValid will return <see langword="false"/> if it's out of bounds
/// </summary>
public static RemotePlaySession GetSession( int index ) => Internal?.GetSessionID( index ).Value ?? default;
/// <summary>
/// Invite a friend to Remote Play Together
/// This returns false if the invite can't be sent
/// Invite a friend to Remote Play Together.
/// This returns <see langword="false"/> if the invite can't be sent
/// </summary>
public static bool SendInvite( SteamId steamid ) => Internal != null && Internal.BSendRemotePlayTogetherInvite( steamid );
}