mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 06:38:01 +03:00
App.GetName + GetInstallFolder, GetBuildId
This commit is contained in:
parent
ef8234b958
commit
8d410969c3
@ -51,5 +51,15 @@ namespace Facepunch.Steamworks.Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void AppName()
|
||||||
|
{
|
||||||
|
using ( var client = new Facepunch.Steamworks.Client( 252490 ) )
|
||||||
|
{
|
||||||
|
var name = client.App.GetName( 4000 );
|
||||||
|
Console.WriteLine( name );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,8 +121,10 @@ namespace Facepunch.Steamworks
|
|||||||
BetaName = native.apps.GetCurrentBetaName();
|
BetaName = native.apps.GetCurrentBetaName();
|
||||||
OwnerSteamId = native.apps.GetAppOwner();
|
OwnerSteamId = native.apps.GetAppOwner();
|
||||||
var appInstallDir = native.apps.GetAppInstallDir(AppId);
|
var appInstallDir = native.apps.GetAppInstallDir(AppId);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(appInstallDir) && Directory.Exists(appInstallDir))
|
if (!String.IsNullOrEmpty(appInstallDir) && Directory.Exists(appInstallDir))
|
||||||
InstallFolder = new DirectoryInfo(appInstallDir);
|
InstallFolder = new DirectoryInfo(appInstallDir);
|
||||||
|
|
||||||
BuildId = native.apps.GetAppBuildId();
|
BuildId = native.apps.GetAppBuildId();
|
||||||
CurrentLanguage = native.apps.GetCurrentGameLanguage();
|
CurrentLanguage = native.apps.GetCurrentGameLanguage();
|
||||||
AvailableLanguages = native.apps.GetAvailableGameLanguages().Split( new[] {';'}, StringSplitOptions.RemoveEmptyEntries ); // TODO: Assumed colon separated
|
AvailableLanguages = native.apps.GetAvailableGameLanguages().Split( new[] {';'}, StringSplitOptions.RemoveEmptyEntries ); // TODO: Assumed colon separated
|
||||||
|
@ -72,5 +72,34 @@ namespace Facepunch.Steamworks
|
|||||||
{
|
{
|
||||||
return client.native.apps.BIsAppInstalled(appId);
|
return client.native.apps.BIsAppInstalled(appId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the appid's name
|
||||||
|
/// Returns error if the current app Id does not have permission to use this interface
|
||||||
|
/// </summary>
|
||||||
|
public string GetName( uint appId )
|
||||||
|
{
|
||||||
|
var str = client.native.applist.GetAppName( appId );
|
||||||
|
if ( str == null ) return "error";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the app's install folder
|
||||||
|
/// Returns error if the current app Id does not have permission to use this interface
|
||||||
|
/// </summary>
|
||||||
|
public string GetInstallFolder( uint appId )
|
||||||
|
{
|
||||||
|
return client.native.applist.GetAppInstallDir( appId );
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the app's current build id
|
||||||
|
/// Returns 0 if the current app Id does not have permission to use this interface
|
||||||
|
/// </summary>
|
||||||
|
public int GetBuildId( uint appId )
|
||||||
|
{
|
||||||
|
return client.native.applist.GetAppBuildId( appId );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user