ISteamApps Methods Complete

This commit is contained in:
Garry Newman 2019-04-13 21:26:10 +01:00
parent fe0d934bfc
commit 76c82bff25
2 changed files with 31 additions and 0 deletions

View File

@ -71,6 +71,14 @@ public async Task GetFileDetails()
Console.WriteLine( $"fileinfo.Sha1: {fileinfo.Sha1}" );
Console.WriteLine( $"fileinfo.Flags: {fileinfo.Flags}" );
}
[TestMethod]
public async Task CommandLine()
{
var cl = Apps.CommandLine;
Console.WriteLine( $"CommandLine: {cl}" );
}
}
}

View File

@ -29,6 +29,11 @@ internal static Internal.ISteamApps steamapps
/// </summary>
public static bool IsSubscribed => steamapps.BIsSubscribed();
/// <summary>
/// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
/// </summary>
public static bool IsSubscribedFromFamilySharing => steamapps.BIsSubscribedFromFamilySharing();
/// <summary>
/// Checks if the license owned by the user provides low violence depots.
/// Low violence depots are useful for copies sold in countries that have content restrictions
@ -228,5 +233,23 @@ public static async Task<FileDetails> GetFileDetails( string filename )
};
}
/// <summary>
/// Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/.
/// This method of passing a connect string (used when joining via rich presence, accepting an
/// invite, etc) is preferable to passing the connect string on the operating system command
/// line, which is a security risk. In order for rich presence joins to go through this
/// path and not be placed on the OS command line, you must set a value in your app's
/// configuration on Steam. Ask Valve for help with this.
/// </summary>
public static string CommandLine
{
get
{
var sb = SteamNative.Helpers.TakeStringBuilder();
var len = steamapps.GetLaunchCommandLine( sb, sb.Capacity );
return sb.ToString();
}
}
}
}