mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-05 06:15:26 +00:00
PowerControl: Support RTSS in custom folder
This commit is contained in:
parent
e1a4073a7c
commit
bc9c3199b7
4 changed files with 158 additions and 72 deletions
|
|
@ -26,22 +26,29 @@ namespace PowerControl.Options
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!Dependencies.EnsureRTSS(null))
|
||||
return "?";
|
||||
|
||||
RTSS.LoadProfile();
|
||||
if (RTSS.GetProfileProperty("FramerateLimit", out int framerate))
|
||||
return (framerate == 0) ? "Off" : framerate.ToString();
|
||||
return null;
|
||||
}
|
||||
catch(Exception e)
|
||||
catch (Exception e)
|
||||
{
|
||||
#if DEBUG
|
||||
CommonHelpers.Log.TraceException("RTSS", e);
|
||||
#endif
|
||||
return "?";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
ApplyValue = (selected) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Dependencies.EnsureRTSS(Controller.TitleWithVersion))
|
||||
return null;
|
||||
|
||||
int framerate = 0;
|
||||
if (selected != "Off")
|
||||
framerate = int.Parse(selected);
|
||||
|
|
@ -55,7 +62,7 @@ namespace PowerControl.Options
|
|||
RTSS.UpdateProfiles();
|
||||
return (framerate == 0) ? "Off" : framerate.ToString();
|
||||
}
|
||||
catch(Exception e)
|
||||
catch (Exception e)
|
||||
{
|
||||
CommonHelpers.Log.TraceException("RTSS", e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue