Add global lock on startup to prevent race conditions

This commit is contained in:
Kamil Trzciński 2022-11-15 17:00:13 +01:00
parent 40be8eee70
commit 6211bc4f42
10 changed files with 109 additions and 58 deletions

View file

@ -11,20 +11,7 @@ namespace FanControl
internal class Program
{
static void Main(string[] args)
{
if (!Vlv0100.IsSupported())
{
String message = "";
message += "Current device is not supported.\n";
message += "FirmwareVersion: " + Vlv0100.GetFirmwareVersion().ToString("X") + "\n";
message += "BoardID: " + Vlv0100.GetBoardID().ToString("X") + "\n";
message += "PDCS: " + Vlv0100.GetPDCS().ToString("X") + "\n";
String title = "Steam Deck Fan Control v" + Application.ProductVersion.ToString();
MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
{
Application.Run(new FanControlForm());
}
}