diff --git a/HandheldCompanion.iss b/HandheldCompanion.iss index 6f0653221..e1d8b6583 100644 --- a/HandheldCompanion.iss +++ b/HandheldCompanion.iss @@ -312,10 +312,10 @@ end; procedure Dependency_AddHideHide; begin - Dependency_Add('HidHide_1.4.192_x64.exe', + Dependency_Add('HidHide_1.4.202_x64.exe', '/quiet /norestart', 'HidHide Drivers', - 'https://github.com/nefarius/HidHide/releases/download/v1.4.192.0/HidHide_1.4.192_x64.exe', + 'https://github.com/nefarius/HidHide/releases/download/v1.4.202.0/HidHide_1.4.202_x64.exe', '', True, False); end; @@ -364,7 +364,7 @@ end; #define MyAppSetupName 'Handheld Companion' #define MyBuildId 'HandheldCompanion' -#define MyAppVersion '0.20.3.1' +#define MyAppVersion '0.20.4.0' #define MyAppPublisher 'BenjaminLSR' #define MyAppCopyright 'Copyright @ BenjaminLSR' #define MyAppURL 'https://github.com/Valkirie/HandheldCompanion' @@ -482,7 +482,7 @@ begin if not(keepHidhideCheckbox.Checked) then begin - if(ShellExec('', 'msiexec.exe', '/X{BE49B9DE-F8EB-4F54-B312-DD4B601985FC}', '', SW_SHOW, ewWaitUntilTerminated, resultCode)) then + if(ShellExec('', 'msiexec.exe', '/X{50D7EB6D-6A4A-4A38-B09C-CC28F75F082E} /L*V "C:\HidHide-Uninstall.log"', '', SW_SHOW, ewWaitUntilTerminated, resultCode)) then begin log('Successfully executed Hidhide uninstaller'); if(resultCode = 0) then @@ -580,4 +580,4 @@ begin Result := True; end; -#endif +#endif \ No newline at end of file diff --git a/HandheldCompanion/ADLX/ADLXBackend.cs b/HandheldCompanion/ADLX/ADLXBackend.cs new file mode 100644 index 000000000..a3702e47e --- /dev/null +++ b/HandheldCompanion/ADLX/ADLXBackend.cs @@ -0,0 +1,103 @@ +using System.Runtime.InteropServices; + +namespace HandheldCompanion.ADLX +{ + public class ADLXBackend + { + public const string ADLX_Wrapper = @"ADLX_Wrapper.dll"; + + [StructLayout(LayoutKind.Sequential)] + public struct AdlxTelemetryData + { + // GPU Usage + public bool gpuUsageSupported; + public double gpuUsageValue; + + // GPU Core Frequency + public bool gpuClockSpeedSupported; + public double gpuClockSpeedValue; + + // GPU VRAM Frequency + public bool gpuVRAMClockSpeedSupported; + public double gpuVRAMClockSpeedValue; + + // GPU Core Temperature + public bool gpuTemperatureSupported; + public double gpuTemperatureValue; + + // GPU Hotspot Temperature + public bool gpuHotspotTemperatureSupported; + public double gpuHotspotTemperatureValue; + + // GPU Power + public bool gpuPowerSupported; + public double gpuPowerValue; + + // Fan Speed + public bool gpuFanSpeedSupported; + public double gpuFanSpeedValue; + + // VRAM Usage + public bool gpuVramSupported; + public double gpuVramValue; + + // GPU Voltage + public bool gpuVoltageSupported; + public double gpuVoltageValue; + + // GPU TBP + public bool gpuTotalBoardPowerSupported; + public double gpuTotalBoardPowerValue; + } + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool IntializeAdlx(); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool CloseAdlx(); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool HasRSRSupport(); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetRSR(); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetRSR(bool enable); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern int GetRSRSharpness(); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetRSRSharpness(int sharpness); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetAntiLag(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetAntiLag(int GPU, bool enable); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetBoost(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetBoost(int GPU, bool enable); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern int GetBoostResolution(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetBoostResolution(int GPU, int minRes); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetChill(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetChill(int GPU, bool enable); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern int GetChillMinFPS(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetChillMinFPS(int GPU, int minFPS); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern int GetChillMaxFPS(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetChillMaxFPS(int GPU, int maxFPS); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetImageSharpening(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetImageSharpening(int GPU, bool enable); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern int GetImageSharpeningSharpness(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetImageSharpeningSharpness(int GPU, int sharpness); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool HasIntegerScalingSupport(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetIntegerScaling(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetIntegerScaling(int GPU, bool enabled); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool HasGPUScalingSupport(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetGPUScaling(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetGPUScaling(int GPU, bool enabled); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool HasScalingModeSupport(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern int GetScalingMode(int GPU); + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool SetScalingMode(int GPU, int mode); + + [DllImport(ADLX_Wrapper, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetAdlxTelemetry(int GPU, ref AdlxTelemetryData adlxTelemetryData); + + internal static AdlxTelemetryData GetTelemetryData() + { + AdlxTelemetryData TelemetryData = new(); + bool Result = GetAdlxTelemetry(0, ref TelemetryData); + return TelemetryData; + } + } +} diff --git a/HandheldCompanion/ADLX_3DSettings.dll b/HandheldCompanion/ADLX_3DSettings.dll deleted file mode 100644 index 7cdeefa6f..000000000 Binary files a/HandheldCompanion/ADLX_3DSettings.dll and /dev/null differ diff --git a/HandheldCompanion/ADLX_DisplaySettings.dll b/HandheldCompanion/ADLX_DisplaySettings.dll deleted file mode 100644 index dc8b70eae..000000000 Binary files a/HandheldCompanion/ADLX_DisplaySettings.dll and /dev/null differ diff --git a/HandheldCompanion/ADLX_Wrapper.dll b/HandheldCompanion/ADLX_Wrapper.dll new file mode 100644 index 000000000..9a61d0678 Binary files /dev/null and b/HandheldCompanion/ADLX_Wrapper.dll differ diff --git a/HandheldCompanion/App.config b/HandheldCompanion/App.config index a3ffdcfcf..a6c1d1472 100644 --- a/HandheldCompanion/App.config +++ b/HandheldCompanion/App.config @@ -11,246 +11,276 @@ - - False - - - False - - - False - - - False - - - 720 - - - 1280 - - - 0 - - - 0 - - - 2 - - - 0 - - - 1989-12-20 - - - 0 - - - 7 - - - 300 - - - 1 - - - 0.25 - - - 250 - - - en-US - - - 0 - - - 0 - - - 0 - - - False - - - -1 - - - 0 - - - 30 - - - False - - - True - - - 720 - - - False - - - 0 - - - 0 - - - 1 - - - #00000000 - - - 0 - - - True - - - 1 - - - False - - - https://api.github.com/repos/Valkirie/HandheldCompanion - - - True - - - True - - - 100 - - - - - - True - - - False - - - True - - - False - - - False - - - True - - - 40 - - - False - - - False - - - True - - - False - - - False - - - 0 - - - 1000 - - - -1 - - - True - - - 3 - - - 1 - - - False - - - True - - - False - - - 0 - - - 1 - - - True - - - 26760 - - - 127.0.0.1 - - - 50 - - - #FFFFFF00 - - - False - - - False - - - 0 - - - True - - - #FFFFFF00 - - - False - - - 50 - - - False - - - False - - - 2 - - + + False + + + False + + + False + + + False + + + 720 + + + 1280 + + + 0 + + + 0 + + + 2 + + + 0 + + + 1989-12-20 + + + 0 + + + 7 + + + 300 + + + 1 + + + 0.25 + + + 250 + + + en-US + + + 0 + + + 0 + + + 0 + + + False + + + -1 + + + 0 + + + 30 + + + False + + + True + + + 720 + + + False + + + 0 + + + 0 + + + 1 + + + #00000000 + + + 0 + + + True + + + 1 + + + False + + + https://api.github.com/repos/Valkirie/HandheldCompanion + + + True + + + True + + + 100 + + + + + + True + + + False + + + True + + + False + + + False + + + True + + + 40 + + + False + + + False + + + True + + + False + + + False + + + 0 + + + 1000 + + + -1 + + + True + + + 3 + + + 1 + + + False + + + True + + + False + + + 0 + + + 1 + + + True + + + 26760 + + + 127.0.0.1 + + + 50 + + + #FFFFFF00 + + + False + + + False + + + 0 + + + True + + + #FFFFFF00 + + + False + + + 50 + + + False + + + False + + + 2 + + + 2 + + + 2 + + + 2 + + + 2 + + + 2 + + + 2 + + + 2 + + + 2 + + + Time,GPU,CPU,VRAM,RAM,BATT,FPS + + + False + + \ No newline at end of file diff --git a/HandheldCompanion/App.xaml b/HandheldCompanion/App.xaml index e41d783e8..6e2074da8 100644 --- a/HandheldCompanion/App.xaml +++ b/HandheldCompanion/App.xaml @@ -65,6 +65,7 @@ + diff --git a/HandheldCompanion/Controllers/IController.xaml b/HandheldCompanion/Controllers/IController.xaml index 595e0f0fd..a9e332655 100644 --- a/HandheldCompanion/Controllers/IController.xaml +++ b/HandheldCompanion/Controllers/IController.xaml @@ -4,8 +4,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:HandheldCompanion.Controllers" - xmlns:resx="clr-namespace:HandheldCompanion.Properties" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:resx="clr-namespace:HandheldCompanion.Properties" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" d:DesignHeight="450" d:DesignWidth="800" @@ -30,20 +30,67 @@ FontSize="30" Glyph="␼" /> - + - - - - - - - - - - - - + + + + + + + + + + + + @@ -53,8 +100,8 @@ Name="ui_button_hook" Width="100" Click="ui_button_hook_Click" - FontSize="14" Content="{x:Static resx:Resources.Controller_Connect}" + FontSize="14" Style="{DynamicResource AccentButtonStyle}" />