mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-02-02 05:34:27 +01:00
Move AMD to GPU.AMDAdrenaline
This commit is contained in:
parent
7b1442db14
commit
b06ac16fba
|
|
@ -5,16 +5,16 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PowerControl.Helpers
|
||||
namespace PowerControl.Helpers.GPU
|
||||
{
|
||||
internal class AMD
|
||||
internal class AMDAdrenaline
|
||||
{
|
||||
// TODO: This CLSID is likely to change over time and be broken
|
||||
// pnputil /enum-devices /class Display
|
||||
const String GPUDriverKey = "SYSTEM\\CurrentControlSet\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}\\0000";
|
||||
const String DriverDesc = "DriverDesc";
|
||||
const String ExpectedDriverDesc = "AMD Custom GPU 0405";
|
||||
const String GPUScaling = "GPUScaling00";
|
||||
const string GPUDriverKey = "SYSTEM\\CurrentControlSet\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}\\0000";
|
||||
const string DriverDesc = "DriverDesc";
|
||||
const string ExpectedDriverDesc = "AMD Custom GPU 0405";
|
||||
const string GPUScaling = "GPUScaling00";
|
||||
|
||||
internal static bool IsGPUScalingEnabled()
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ namespace PowerControl.Helpers
|
|||
return false;
|
||||
|
||||
var driverDesc = registry.GetValue(DriverDesc);
|
||||
if (driverDesc is String && ((string)driverDesc) != ExpectedDriverDesc)
|
||||
if (driverDesc is string && (string)driverDesc != ExpectedDriverDesc)
|
||||
return false;
|
||||
|
||||
var scalingBytes = registry.GetValue(GPUScaling);
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using CommonHelpers;
|
||||
using PowerControl.Helpers;
|
||||
using PowerControl.Helpers.GPU;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
|
@ -56,7 +57,7 @@ namespace PowerControl
|
|||
Name = "Resolution",
|
||||
ApplyDelay = 1000,
|
||||
ResetValue = () => {
|
||||
if (!AMD.IsGPUScalingEnabled() && !Settings.Default.EnableExperimentalFeatures)
|
||||
if (!AMDAdrenaline.IsGPUScalingEnabled() && !Settings.Default.EnableExperimentalFeatures)
|
||||
return null;
|
||||
return Helpers.PhysicalMonitorBrightnessController.GetAllResolutions().Last();
|
||||
},
|
||||
|
|
@ -69,7 +70,7 @@ namespace PowerControl
|
|||
},
|
||||
CurrentValue = delegate()
|
||||
{
|
||||
if (!AMD.IsGPUScalingEnabled() && !Settings.Default.EnableExperimentalFeatures)
|
||||
if (!AMDAdrenaline.IsGPUScalingEnabled() && !Settings.Default.EnableExperimentalFeatures)
|
||||
return null;
|
||||
return Helpers.PhysicalMonitorBrightnessController.GetResolution();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue