From 88c742d415776b4bdf700577479007be1addc615 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Tue, 18 Aug 2020 11:33:31 +0100 Subject: [PATCH] Added SteamApps.IsTimedTrial --- Facepunch.Steamworks/SteamApps.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Facepunch.Steamworks/SteamApps.cs b/Facepunch.Steamworks/SteamApps.cs index c32b2be..5c43e9a 100644 --- a/Facepunch.Steamworks/SteamApps.cs +++ b/Facepunch.Steamworks/SteamApps.cs @@ -266,5 +266,24 @@ namespace Steamworks } } + /// + /// check if game is a timed trial with limited playtime + /// + public static bool IsTimedTrial( out int secondsAllowed, out int secondsPlayed ) + { + uint a = 0; + uint b = 0; + secondsAllowed = 0; + secondsPlayed = 0; + + if ( !Internal.BIsTimedTrial( ref a, ref b ) ) + return false; + + secondsAllowed = (int) a; + secondsPlayed = (int) b; + + return true; + } + } } \ No newline at end of file