v1.0.13.1 (first post-1.0 patch)
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public class SteamRemotePlay : SteamClientClass<SteamRemotePlay>
|
||||
{
|
||||
internal static ISteamRemotePlay Internal => Interface as ISteamRemotePlay;
|
||||
internal static ISteamRemotePlay? Internal => Interface as ISteamRemotePlay;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
@@ -30,29 +30,29 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Called when a session is connected
|
||||
/// </summary>
|
||||
public static event Action<RemotePlaySession> OnSessionConnected;
|
||||
public static event Action<RemotePlaySession>? OnSessionConnected;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a session becomes disconnected
|
||||
/// </summary>
|
||||
public static event Action<RemotePlaySession> OnSessionDisconnected;
|
||||
public static event Action<RemotePlaySession>? OnSessionDisconnected;
|
||||
|
||||
/// <summary>
|
||||
/// Get the number of currently connected Steam Remote Play sessions
|
||||
/// </summary>
|
||||
public static int SessionCount => (int) Internal.GetSessionCount();
|
||||
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
|
||||
/// </summary>
|
||||
public static RemotePlaySession GetSession( int index ) => (RemotePlaySession) Internal.GetSessionID( index ).Value;
|
||||
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
|
||||
/// </summary>
|
||||
public static bool SendInvite( SteamId steamid ) => Internal.BSendRemotePlayTogetherInvite( steamid );
|
||||
public static bool SendInvite( SteamId steamid ) => Internal != null && Internal.BSendRemotePlayTogetherInvite( steamid );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user