Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup HWiNFO Platform #881

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}
Loading