Skip to content

Commit

Permalink
Cleanup HWiNFO Platform
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperH2O authored Dec 14, 2023
1 parent 25cc827 commit 9a1d582
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions HandheldCompanion/Platforms/HWiNFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,9 @@ private void SystemWatcher_Changed(object sender, FileSystemEventArgs e)

public override bool Start()
{
// not authorized
// var hasSensorsSM = GetProperty("SensorsSM");

// start HWiNFO if not running or Shared Memory is disabled
if (!IsRunning) // || !hasSensorsSM)
// start HWiNFO if not running
if (!IsRunning)
{
// StopProcess();
StartProcess();
}
else
Expand Down Expand Up @@ -188,14 +184,9 @@ private void Watchdog_Elapsed(object? sender, ElapsedEventArgs e)
catch
{
// not authorized
// shared memory is disabled, halt process
/*
if (prevPoll_time != -1)
StopProcess();
*/
// shared memory is disabled

// raise event
// todo: implement a new hint
SetStatus(PlatformStatus.Stalled);
Monitor.Exit(updateLock);
return;
Expand All @@ -204,11 +195,7 @@ private void Watchdog_Elapsed(object? sender, ElapsedEventArgs e)
// we couldn't poll HWiNFO, halt process
if (HWiNFOMemory.poll_time == prevPoll_time)
{
// not authorized
// StopProcess();

// raise event
// todo: implement a new hint
SetStatus(PlatformStatus.Stalled);
Monitor.Exit(updateLock);
return;
Expand Down Expand Up @@ -543,10 +530,6 @@ public override bool StartProcess()
SetProperty("MinimalizeMainWnd", 1);
SetProperty("MinimalizeSensors", 1);
SetProperty("MinimalizeSensorsClose", 1);

// not authorized
// SetProperty("SensorsSM", 1); // Shared Memory Support [12-HOUR LIMIT]

SetProperty("ShowWelcomeAndProgress", 0);
SetProperty("SensorsOnly", 1);
SetProperty("AutoUpdateBetaDisable", 1);
Expand Down Expand Up @@ -687,4 +670,4 @@ public class Sensor
public delegate void GPUFrequencyChangedHandler(double value);

#endregion
}
}

0 comments on commit 9a1d582

Please sign in to comment.