2022-11-15 15:42:05 +01:00
|
|
|
using CommonHelpers;
|
2022-11-22 11:29:32 +01:00
|
|
|
using PowerControl.Helpers;
|
|
|
|
|
using PowerControl.Helpers.AMD;
|
2022-11-15 15:42:05 +01:00
|
|
|
using System.Diagnostics;
|
2022-11-22 11:29:32 +01:00
|
|
|
using System.Runtime.InteropServices;
|
2022-11-14 11:06:03 +01:00
|
|
|
|
|
|
|
|
namespace PowerControl
|
|
|
|
|
{
|
|
|
|
|
internal static class Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The main entry point for the application.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
|
|
|
|
static void Main()
|
|
|
|
|
{
|
2022-12-12 15:08:00 +01:00
|
|
|
Instance.WithSentry(() =>
|
2022-11-15 15:42:05 +01:00
|
|
|
{
|
2022-12-12 15:08:00 +01:00
|
|
|
if (Settings.Default.EnableExperimentalFeatures)
|
2022-11-23 10:30:13 +01:00
|
|
|
{
|
2022-12-19 12:33:45 +01:00
|
|
|
if (!Settings.Default.AckAntiCheat(
|
|
|
|
|
Controller.TitleWithVersion,
|
|
|
|
|
"ExperimentalFeatures",
|
|
|
|
|
"You are running EXPERIMENTAL build."))
|
|
|
|
|
return;
|
|
|
|
|
|
2022-12-12 15:08:00 +01:00
|
|
|
for (int i = 0; !VangoghGPU.IsSupported; i++)
|
|
|
|
|
{
|
|
|
|
|
Instance.WithGlobalMutex(1000, () => VangoghGPU.Detect());
|
|
|
|
|
if (VangoghGPU.IsSupported)
|
|
|
|
|
Thread.Sleep(300);
|
|
|
|
|
}
|
2022-11-23 10:30:13 +01:00
|
|
|
}
|
2022-11-15 15:42:05 +01:00
|
|
|
|
2022-12-12 15:08:00 +01:00
|
|
|
// To customize application configuration such as set high DPI settings or default font,
|
|
|
|
|
// see https://aka.ms/applicationconfiguration.
|
|
|
|
|
ApplicationConfiguration.Initialize();
|
2022-11-14 11:06:03 +01:00
|
|
|
|
2022-12-12 15:08:00 +01:00
|
|
|
using (var controller = new Controller())
|
|
|
|
|
{
|
|
|
|
|
Application.Run();
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-11-14 11:06:03 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|