-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix RogAlly button support #810
Conversation
WalkthroughThe codebase for the Handheld Companion application has been updated, focusing on the Changes
Poem
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- Resources/HidLibrary.dll
Files selected for processing (2)
- HandheldCompanion/Devices/ASUS/ROGAlly.cs (9 hunks)
- HandheldCompanion/HandheldCompanion.csproj (2 hunks)
Additional comments: 12
HandheldCompanion/HandheldCompanion.csproj (2)
139-144: No changes have been made in this hunk.
2270-2272: The reference to "HidLibrary.dll" has been added. Ensure that the DLL is present at the specified path and is compatible with the project's target framework.
<Reference Include="HidLibrary"> <HintPath>..\Resources\HidLibrary.dll</HintPath> </Reference>HandheldCompanion/Devices/ASUS/ROGAlly.cs (10)
1-14: Removed unused namespaces and using statements. This is a good practice as it helps to keep the code clean and reduces the potential for namespace conflicts.
17-25: The
keyMapping
dictionary has been initialized with some key-value pairs. Ensure that these keys and values are correct and meaningful in the context of your application.27-30: The
hidDevice
field has been replaced with aDictionary<byte, HidDevice>
namedhidDevices
, and a new constantINPUT_HID_ID
has been introduced. This change seems to be in line with the new design of handling multiple HID devices.32-32: The
IsOpen
property has been updated to check if the HID device with theINPUT_HID_ID
is open and if theasusACPI
object is not null and open. This is a good practice as it ensures that the device is ready before any operations are performed on it.88-97: The
Open
method has been updated to initialize theasusACPI
object and check if it is null. This is a good practice as it ensures that theasusACPI
object is ready before any operations are performed on it.102-110: The
Close
method has been updated to close all HID devices in thehidDevices
dictionary. This is a good practice as it ensures that all resources are properly released when the device is closed.112-144: The
IsReady
method has been updated to iterate over the HID devices and check if the device with theINPUT_HID_ID
is connected and readable. This is a good practice as it ensures that the device is ready before any operations are performed on it.146-154: A new
OnReport
method has been added to handle HID report events. This is a good practice as it allows for more granular handling of HID events.178-185: The
SetFanControl
,SetFanDuty
, andReadFanDuty
methods have been updated to check for device openness before performing actions. This is a good practice as it prevents operations from being performed on a device that is not open.224-232: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [224-237]
The
HandleEvent
method has been modified to handle specific key events. Ensure that these key events are correct and meaningful in the context of your application.
Summary by CodeRabbit
ROGAlly
class for better device handling and event management.SetFanControl
,SetFanDuty
, andReadFanDuty
methods.