Make interface more flexible by passing the whole instance object to the framerate source

This commit is contained in:
IceStormNG
2024-03-01 07:52:27 +01:00
parent 82f90fcab3
commit 06205a1ad3
3 changed files with 4 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ namespace GHelper.AutoTDP.FramerateSource
return giL;
}
public double GetFramerate(string processName)
public double GetFramerate(GameInstance instance)
{
if (!IsRunning)
{
@@ -79,7 +79,7 @@ namespace GHelper.AutoTDP.FramerateSource
try
{
var appE = OSD.GetAppEntries()
.Where(x => (x.Flags & AppFlags.MASK) != AppFlags.None).FirstOrDefault(a => a.Name.EndsWith(processName));
.Where(x => (x.Flags & AppFlags.MASK) != AppFlags.None).FirstOrDefault(a => a.ProcessId == instance.ProcessID);
if (appE is null)
return -1.0d;