-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging EA into Mainline #979
Changes from all commits
f0951c5
3bec678
bf664f6
009d555
3872ff8
0c00903
635f9d3
a62843a
8b2b6a7
cd532a3
59edc7f
0a797cb
c0d41fc
86410a4
5cba0f4
c944ced
8c5346c
b3e36f2
846681f
b1cdb72
dc575e5
4dfdd20
031bac0
680ff02
0a0e897
35862be
03ca0cd
4fdcb6f
9ac87cb
c420a2e
256ab76
f8f8e7b
8139afc
cc3184e
dc4b0b9
4234c3e
2272189
1bd16be
a1c4de0
86e1462
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The uninstall command for HidHide uses a hardcoded path which may not be valid for all installations. Consider using a dynamic approach to locate the uninstaller. - Filename: "C:\Program Files\Nefarius Software Solutions\HidHide\x64\HidHideCLI.exe";
+ Filename: "{pf}\Nefarius Software Solutions\HidHide\x64\HidHideCLI.exe"; Committable suggestion
Suggested change
|
||||||
begin | ||||||
log('Successfully executed Hidhide uninstaller'); | ||||||
if(resultCode = 0) then | ||||||
|
@@ -580,4 +580,4 @@ begin | |||||
Result := True; | ||||||
end; | ||||||
|
||||||
#endif | ||||||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
Comment on lines
+53
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure proper error handling for external calls to |
||
|
||
[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); | ||
Comment on lines
+62
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify the return values and error handling for all |
||
|
||
[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; | ||
Comment on lines
+94
to
+100
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding error handling for the |
||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version number in the HidHide dependency URL does not match the filename. Ensure consistency to avoid potential download or installation issues.
Committable suggestion