mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-07 07:14:04 +00:00
All: Improve Anti-Cheat protection
This commit is contained in:
parent
5a7ad0b766
commit
02d68af216
15 changed files with 164 additions and 145 deletions
|
|
@ -18,28 +18,27 @@ namespace PowerControl
|
|||
{
|
||||
Instance.WithSentry(() =>
|
||||
{
|
||||
if (Settings.Default.EnableExperimentalFeatures)
|
||||
{
|
||||
if (!Settings.Default.AckAntiCheat(
|
||||
Controller.TitleWithVersion,
|
||||
"ExperimentalFeatures",
|
||||
"You are running EXPERIMENTAL build."))
|
||||
return;
|
||||
|
||||
for (int i = 0; !VangoghGPU.IsSupported && i < MAX_GPU_RETRIES; i++)
|
||||
{
|
||||
var status = Instance.WithGlobalMutex(1000, () => VangoghGPU.Detect());
|
||||
if (status != VangoghGPU.DetectionStatus.Retryable)
|
||||
break;
|
||||
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
}
|
||||
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
|
||||
if (Settings.Default.EnableExperimentalFeatures)
|
||||
{
|
||||
if (!AntiCheatSettings.Default.AckAntiCheat(
|
||||
Controller.TitleWithVersion,
|
||||
"You are running EXPERIMENTAL build.", null, false))
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; !VangoghGPU.IsSupported && i < MAX_GPU_RETRIES; i++)
|
||||
{
|
||||
var status = Instance.WithGlobalMutex(1000, () => VangoghGPU.Detect());
|
||||
if (status != VangoghGPU.DetectionStatus.Retryable)
|
||||
break;
|
||||
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
|
||||
using (var controller = new Controller())
|
||||
{
|
||||
Application.Run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue