Conversation
WalkthroughAdded a JSON converter for the Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~15 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
HandheldCompanion/Actions/IActions.cs(2 hunks)HandheldCompanion/Converters/ShiftSlotConverter.cs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-07-27T07:08:12.731Z
Learnt from: romracer
Repo: Valkirie/HandheldCompanion PR: 1012
File: HandheldCompanion/Devices/MSI/ClawA1M.cs:0-0
Timestamp: 2024-07-27T07:08:12.731Z
Learning: The `ClawA1M` class in the `HandheldCompanion` project has been refactored to improve readability and maintainability. Changes include the removal of `scope` as a private field, simplification by removing thread logic, encapsulation of WMI event monitoring setup and teardown in separate methods with proper exception handling, and marking `specialKeyWatcher` as nullable.
Applied to files:
HandheldCompanion/Actions/IActions.cs
🧬 Code graph analysis (1)
HandheldCompanion/Actions/IActions.cs (1)
HandheldCompanion/Converters/ShiftSlotConverter.cs (1)
ShiftSlotConverter(13-45)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Release
🔇 Additional comments (4)
HandheldCompanion/Converters/ShiftSlotConverter.cs (2)
40-44: LGTM!Writing as a string representation ensures forward compatibility and clearly distinguishes the new format from legacy integer values. The
ToString()method on a flags enum will correctly produce comma-separated values for combinations.
15-27: ShiftSlot enum is correctly configured for flag combinations.The
ShiftSlotenum inHandheldCompanion/Actions/ShiftActions.csis properly decorated with the[Flags]attribute and uses power-of-2 values (via bit shift notation:1 << 0,1 << 1, etc.). TheEnum.TryParsecall in theReadJsonmethod will correctly handle flag combinations like "ShiftA, ShiftB".HandheldCompanion/Actions/IActions.cs (2)
139-140: Verify default shift behavior aligns with PR objectives.The PR objectives state: "Change default shift behavior from 'Disabled' to 'Shift A.'" However, the field is initialized to
ShiftSlot.Any, which according to theIsShiftAllowedlogic means "always enabled regardless of shift state."Please confirm whether:
ShiftSlot.Anyis the intended default (always enabled), or- The default should be
ShiftSlot.ShiftAto align with the stated objective.
415-426: LGTM! Exact matching logic correctly implemented.The shift validation now uses exact matching (
current == required) instead of permissive overlap checks, which aligns with the PR objectives. The special handling forAny(always enabled) andNone(only when no shifts pressed) is appropriate.
| // Old format: integer - needs migration | ||
| int rawValue = Convert.ToInt32(reader.Value); | ||
| return rawValue switch | ||
| { | ||
| 3 => ShiftSlot.ShiftC, // Old ShiftC (3) -> New ShiftC (4) | ||
| 4 => ShiftSlot.ShiftD, // Old ShiftD (4) -> New ShiftD (8) | ||
| 5 => ShiftSlot.Any, // Old Any (5) -> New Any (128) | ||
| _ => (ShiftSlot)rawValue // 0, 1, 2 unchanged; higher values are already new format | ||
| }; | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Add exception handling for Convert.ToInt32.
Convert.ToInt32(reader.Value) can throw FormatException, InvalidCastException, or OverflowException if the JSON contains unexpected values. Consider wrapping this in a try-catch block and returning a sensible default (e.g., ShiftSlot.Any) on failure to prevent deserialization crashes.
🔎 Proposed fix with exception handling
// Old format: integer - needs migration
-int rawValue = Convert.ToInt32(reader.Value);
-return rawValue switch
+try
{
- 3 => ShiftSlot.ShiftC, // Old ShiftC (3) -> New ShiftC (4)
- 4 => ShiftSlot.ShiftD, // Old ShiftD (4) -> New ShiftD (8)
- 5 => ShiftSlot.Any, // Old Any (5) -> New Any (128)
- _ => (ShiftSlot)rawValue // 0, 1, 2 unchanged; higher values are already new format
-};
+ int rawValue = Convert.ToInt32(reader.Value);
+ return rawValue switch
+ {
+ 3 => ShiftSlot.ShiftC, // Old ShiftC (3) -> New ShiftC (4)
+ 4 => ShiftSlot.ShiftD, // Old ShiftD (4) -> New ShiftD (8)
+ 5 => ShiftSlot.Any, // Old Any (5) -> New Any (128)
+ _ => (ShiftSlot)rawValue // 0, 1, 2 unchanged; higher values are already new format
+ };
+}
+catch (Exception)
+{
+ return ShiftSlot.Any; // Safe default on conversion failure
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Old format: integer - needs migration | |
| int rawValue = Convert.ToInt32(reader.Value); | |
| return rawValue switch | |
| { | |
| 3 => ShiftSlot.ShiftC, // Old ShiftC (3) -> New ShiftC (4) | |
| 4 => ShiftSlot.ShiftD, // Old ShiftD (4) -> New ShiftD (8) | |
| 5 => ShiftSlot.Any, // Old Any (5) -> New Any (128) | |
| _ => (ShiftSlot)rawValue // 0, 1, 2 unchanged; higher values are already new format | |
| }; | |
| } | |
| // Old format: integer - needs migration | |
| try | |
| { | |
| int rawValue = Convert.ToInt32(reader.Value); | |
| return rawValue switch | |
| { | |
| 3 => ShiftSlot.ShiftC, // Old ShiftC (3) -> New ShiftC (4) | |
| 4 => ShiftSlot.ShiftD, // Old ShiftD (4) -> New ShiftD (8) | |
| 5 => ShiftSlot.Any, // Old Any (5) -> New Any (128) | |
| _ => (ShiftSlot)rawValue // 0, 1, 2 unchanged; higher values are already new format | |
| }; | |
| } | |
| catch (Exception) | |
| { | |
| return ShiftSlot.Any; // Safe default on conversion failure | |
| } | |
| } |
🤖 Prompt for AI Agents
In HandheldCompanion/Converters/ShiftSlotConverter.cs around lines 29 to 38, the
direct call to Convert.ToInt32(reader.Value) can throw FormatException,
InvalidCastException, or OverflowException when encountering unexpected JSON;
wrap the conversion and switch in a try-catch that catches those specific
exceptions (or Exception as a fallback) and return a sensible default (e.g.,
ShiftSlot.Any) on failure to avoid deserialization crashes, ensuring the method
continues to map known legacy integer values to the new enum in the try block
and returns ShiftSlot.Any in the catch.
|
Good job |
* feat: correct shift logic and add support for shift combiantions * fix: add backward compatibility
* build 0.27.0.5 * Misc fix * Add missing dynamic lighting capacities to MSI Claw * build 0.27.0.6 * Implement EADesktop support through GameLib (#463) * Implement EADesktop support through GameLib Using custom repo: https://github.com/Valkirie/GameLib.NET/tree/EAapp * Fix EADesktop logo missing from LibraryPage * Ambilight: Reduce CPU consumption (#464) * Reduce CPU usage, phase 1 * misc tweaks * build 0.27.0.7 * Extended expected delay before profile related executable is ready * Improve library manager SteamGrid lookup with cleaned string * Optimizing IActions related functions (#465) * Optimizing IActions related functions * Pass delta to IActions to improve timed actions accuracy * seal a few classes * Use [MethodImpl(MethodImplOptions.AggressiveInlining)] on States * Small State tweaks * further improve States optimization * build 0.27.0.8 * Reduce MSI Claw 1 rumble logic CPU usage * Improved: Set device OEM buttons as Inherit on new profiles * Improved: UI Navigation - Quicktools will remember the last focused item from each page - Quicktools navigation won't focus AppBarButton first - Quicktools L1/R1 will automatically enter the page - MainWindow page flow is more natural when pressing A/B * Implement controller page related support section * Fixed: version checking from profiles manager on older profile * Fixed: GameBarCommands and DesktopCommands * Improved: ROG Ally PerformanceMode and AsusFan.Mid * Hacky: Fixed: Phantom controller filtering * build 0.27.0.9 * Add Inherits for AllButtons and AllAxisLayoutFlags * Update Quicktools Home and Applications UI * Force (re)apply Quicktools transparency when changing postion * Update libs * oups * Fixed: Issue when discovering non-Steam games with multiple executables * Fixed: SDL XInput controller ignored * Fixed: Issues when trying to trigger hotkeys * Fixed: UI Issue when navigating into a page without IsEnabled controls * Improved: QuickHome, QuickApplications UI * build 0.27.0.10 * States fixes * Improved: Removed hacky controller manager await in benefits of more robust device manager arrival logic * Improved: Device management has new queuing logic * Improved: Quicktools L1/R1 will now circle within menu items * Filter SDL Events * Fixed: Restore default fan profile when fan mode is set to Hardware * Migrate some platform logic to PlatformManager We should move the PlatformToProfile logic to LibraryManager or PlatformManager * Fix Claw FanSpeed array * Implemented: new commands ButtonCommands replacing GuideCommands * Improve Action Type UI experience * Fixed: Button to TriggerActions * Improved: ButtonMapping and AxisMapping migrated to SettingsExpander and SettingsCard * Improved: GyroMapping and TriggerMapping migrated to SettingsExpander and SettingsCard * Improved: MouseAction Acceleration is now relying on action delta (ms) to compute velocity memory * Misc UI tweaks * build 0.27.0.11 * Misc UI improvements * Fixed: OEM buttons will now properly inherit default behavior * misc * misc * Fixed: Input/Hotkey injection on dummy controllers * Revert: Improved: Device management has new queuing logic * Fixed: Rog Ally Xbox Adaptive Controller support * Improved: Allow users to edit default power profiles * Edit a few default settings * build 0.27.0.12 * Improve overall fan management and ROG Ally TDP (#466) * (Tentative) Fix TDP/Fan issues * Misc: migrate powerProfile management to IDevice * update lib * Improved: Controller management * Implemented: Per-device hotkeys (#467) * Improved: Controller management * Improved: Per-device hotkeys * build 0.27.0.13 * Fixed: Profile update when resolution or refresh rate is changed * Misc (#468) * Tentative fix buttons RGB control * Fixed: Hotkey deserialization with old ButtonFlags * code cleanup * Fixed: missing library: YamlDotNet * Fixed: hotkey duplication * Updated LibreHardwareMonitorLib * Fixed: Zotac Gaming Zone VRAM control * Fixed: LegionR/LegionL inverted buttons on Legion Go S * build 0.27.0.14 * Improve session and device management (#469) * Improved: HC won't wait until session is ready anymore, except for keyboard input management * Fixed: Device management asynchronous refresh * Fixed: Device management asynchronous refresh * oups * Revert "Fixed: Profile update when resolution or refresh rate is changed" This reverts commit 0fa4512. * only update if necessary * Update SDL3.dll * Device support: Add ONEXPLAYER X1 AMD (weird ProductName: ONEXPLAYER X1z) * Improved: Installation script to add WinRing0x64.sys and HandheldCompanion.sys to defender exclusion list * build 0.28.0.0 * Update libraries * Force refresh platform catalog when scanning * Update LibreHardwareMonitorLib * RyzenAdj 0.18.0 - Update for ryzen_smu 0.1.7 - Support: Strix Point - Support: Dragon Range - Support: Fire Range - Support: HX370 (Pro) - Support: Krackan Point * Fixed: UI not rendering after GPU acceleration is toggled on/off not perfect.. * DClawController to use GenericController instead of raw HidDevice * build 0.28.0.1 * Reduce CPU usage (#470) * Reduce cpu usage on DInputController * Reduce CPU usage from HidLibrary * Reduce CPU usage a pressure on ThreadPool with RaiseInputsUpdatedAsync * Reduce CPU usage from RadioMonitor * Update OverlayModel.xaml * build 0.28.0.2 * Update Resources.fr-FR.resx Traduction par: Moi952 * Improved: UI freeze workaround * build 0.28.0.3 * Update libs * Improve controller management - Properly unhide (with power cycling) if HIDuncloakonclose is set - Wait until any rumble is complete before power cycling * ForceRecompose windows on system resume * Add PawnIO support for LibreHardware 0.9.5 - Fixes CPU power/temperature reading * build 0.28.0.4 * Fixed: Keyboard chord hotkey trigger on SDL-based controllers * Improved: CPU usage on LibreHardwareLibrary * Fixed: Setting a profile favorite subprofile * Improved: ProfilesPage shows saved windows settings alongside live * Revert "Fixed: Keyboard chord hotkey trigger on SDL-based controllers" This reverts commit d0a9483. * Improved: SDL controllers will use Tick() logic rather than inputs pumping * Fixed: MainWindow visibility on Task View when minimized * Updated: LibreHardwareMonitorLib * build 0.28.0.5 * Misc * Improved: Window State/Visibility logic * Misc * Improved: UIGamepad navigation with HyperlinkButton * Implemented: New controller setting: HIDuncloakondisconnect * Fixed: MSI Claw 10F BIOS support * Resolve startup crash and refactor joystick input (#472) * fix(app): Crash caused by Logger not being loaded in the App constructor. * chore(i18n): Improve translate * refactor(Input): Implement angle-based logic for joystick directions * refactor(Input): Rename MotionDirection to DeflectionDirection * Implement faster/better resume from sleep (#473) * Tentative: speed up resume * build 0.28.0.6 * Migrate settings to ProgramData * Improve task manager to speed startup * Revert "Improve task manager to speed startup" This reverts commit c5b93cf5d36eea4ee243b729fe0a1385a0558a19. * misc * build 0.28.0.7 * Use LocalApplicationData * improve resume * Fix KeyboardChord.GetChord * (tentative) force recompose on system resume * misc * wait for user to reply on settings before going further, also use Windows 11 theme * Misc UI improvements * misc * misc * More work on settings migration * Update HotkeysManager.cs * Update App.xaml.cs * misc fix * misc * misc * Fix AsusACPI on system resume * Tentative: Fix stalled UI on system resume * (tentative) fix UI not rendering on resume * (tentative) fix UI not rendering on resume * build 0.28.0.8 * Prevent bottom buttons from getting focus * Implemented: New options for Layout Mapping : Trigger to Button - Turbo, Interruptable, Toggle * (tentative) figure detect S3/S4 sleep states resume * restore arbitrary sleep/resume delay from long sleep * Fix IActions variable naming and usage (HasXXX) * Fixed: Device illustration on about page * Fix * Fixed: SDL trigger to L/RSoft L/RFull * Misc fixes * Device Support: Legion Go 2 (#459) * WIP * Misc * More work * Fixed: Controller picking logic on plug/unplug * Fixed: Translation causing notify icon (task tray) buttons to fail when translated * Improved: Legion Go (1, 2) performance mode TDP (25W) * Fixed: Legion Go 2, internal gyro/accelero angles reading * Fixed: Controller picker * Fixed: Crash on ProcessRenderMode * Update SDL3: 3.2.24 https://github.com/libsdl-org/SDL/releases/tag/release-3.2.24 * Fixed: AYANEO FLIP DS 1S CEcControl_SetSecDispBrightness() * Misc - Migrate dump crashes to {localappdata}\CrashDumps - Create zip backup when migrating {mydocuments}\HandheldCompanion * Prevent the application from starting while we wait for user input * Fixed: Misc crash/exceptions * Fixed: Support over legacy IActions * Fixed: AYANEO Flip DS 2nd screen ON/OFF toggle * Improved: MultimediaManager GetDisplayFriendlyName() * build 0.28.1.0 * Device support: AYANEOFlip1SDS * build 0.28.1.1 * Misc fixes * Remove WinRing0 (#475) * Remove WinRing0 * Fixed: Issue with IGDB background download * Misc * build 0.28.2.0 * Use LpcIO instead of LpcPort * Update OpenLibSys.cs * tentative * tentative * tentative * tentative Use LpcIO instead of LpcPort Update OpenLibSys.cs tentative tentative * Revert "tentative" This reverts commit 3ce974aa7fb369b851cfbc3f9dfbdc98c226c635. * tentative * misc * more work * tentative * more work * Fixes * oups * oups * Fix iss * Update LibreHardwareMonitorLib.dll * build 0.28.1.2 (#476) - Restored WinRing0 for TDP manipulation (until we find an alternative based on PawnIO) * Restore missing WinRing0 force unload * Fixed: Toast hanging * Fixed: UI hanging on startup (WHY !?) * Fixed: Prevent GPUmanger from holding onto DeviceManager while waiting for MultimediaManager to be ready * Improved: Offset non-UI tasks away from UI thread * build 0.28.1.3 * Fixed: UIHelper default DispatcherPriority * Fixed: Add missing WinRing0x64.dll * Fixed: Prevent failed processor initialization from crippling HC startup sequence * build 0.28.1.4 * Improved: Library UI with with Favorites profiles * Fixed: Wrong profile name on overwrite warning (profiles page) * Implement Msiapcfg (#477) * Tentatively add msiapcfg support * Misc fixes * build 0.28.1.5 * Improved UI: SteamGrid Logo parsing and LibraryFamily checkboxes * Update libraries (build 0.28.1.6) * Implemented: Support over Xbox Rog Ally (X/NonX) (#478) * Implemented: Xbox Rog Ally support (WIP) * Fixed: Deploy default power profiles with default profile Should have been done LONG AGO !! * Fixed: MSI Claw (all models) max fan speed (150%) * Update XboxROGAlly.cs * Implemented: Add support over Xbox ROG Ally X/NonX * Change battery overlay widget to better logic and display (#1306) * Refactor Overlay rendering logic to strategy design pattern * Fix ai comments * Add widget system with factory * Fix some AI comments * Add level selection for overlay widgets. Refactor strategies (use widgets. * Fix level for cpu widget in full overlay strategy * - change battery left to hours and minutes format * - add format for hours * - fix after merge from `main` * - little refactoring * - add hours format * - add return if null time left * good to go --------- Co-authored-by: Lesueur Benjamin <benjamin.lesueur@live.com> (cherry picked from commit 283187b) * Fixed: Battery reading without LibreHardwareMonitor (while we wait for a fix) * build 0.28.1.7 * Fixed: Add missing UseOpenLib declarations * Implemented: Task view function * Improved: Task manager commands * build 0.28.1.8 * Fixed: AYANEO Flip 1S DS/KB compatibility * Move to Windows 11 SDK Windows 10 is EOL as of October 14 2025 * Add default AYANEO power profiles (Extreme, Balanced, Saving power) * Updated: Several libraries * Fixed: Error on null processEx * oups * Fixed: Incorrect overwrite message displayed when creating a new profile * Fixed: A crash occuring on OneXPlayerMini and OneXPlayerOneXFly devices * Fixed: A rare crash happening on InputsManager * Update LibreHardwareMonitorLib.dll * UI: Improve LibraryPage image sizes * Fixed: CPU usage from LibreHardware ADLX implementation (rely on ours instead) * Library: Update SDL to 3.3.2 * build 0.28.1.9 * Revert "Library: Update SDL to 3.3.2" This reverts commit 6353143. * UI: Misc improvements * Library: Updated SDL to 3.3.2 * UI: Added Power dropdown button to Quicktools (Lock, Sleep, Shutdown, Restart) * Compatibility: Add Moonlight virtual controller detection and support * Misc * build 0.28.1.10 * Fixed: Prevent empty executable paths from being added to profile * UI: SplashScreen no longer is AlwaysOnTop * Library: Update HidHide, Sentry and LibreHardwareMonitor * Fixed: Touchpad support on Legion Go (1/2) * Fixed: OneX/AOKZOE OEM button support * Implemented: New commands Copilot Voice * Fixed: Joystick to button/keyboard/mouse click (axis threshold range) * Library: Updated WindowsAPICodePack * build 0.28.1.11 * Fixed: Crash caused by a race condition from VirtualManager when waking-up system * UI: Improve toast manager (now has ability to generate clickable toasts) * Improvements: CopilotVoiceCommands now also resize the Copilot window * Fixed: CPU leak when HidDevice is torn off * Fixed: Rare crash on null Controller * Misc * build 0.28.1.12 * Fixed: AYANEO Flip DS missing Close() override * Misc * Controller: Fixed Neptune Controller IsReady, IsConnected checks * Implement .NET10 (#479) * (WIP) implement NET10 support * Update install script * Implement RyzenAdj set_coall() * Fixed: Steam Deck GPU reading * Update libraries to NET10: LibreHardware, ViGEm.Client * Update Nefarius.ViGEm.Client.dll * Device support: GPD Win 5 (WIP) * Improved: Process manager will now ignore Taskbar and Shellhost * Updated: Libraries * build 0.28.2.1 * Improved: Process manager ForegroundStaging and XamlExplorerHostIslandWindow are now Restricted * Improved: Process manager ApplicationManager_DesktopShellWindow is now Restricted * build 0.28.2.2 * Library: Update iNKORE.UI.WPF.Modern * Device support: Improve overall AOKZOE and ONEX compatibility (fixes OEM button usage and improve FAN/LED management) (#480) * Tentative: Fix OneX button lock * Fixed: Several issues with OneX devices and IsOpen, IsReady checks as well ad HidDevice pickup on OneXFly * Device support: OneXPlayer G1 * Improved overall ONEX/AOKZOE device support backported some logic from HHD * Device support: Add DynamicLightingSecondLEDColor to all AYANEO devices * Implement proper voltage control (AMD, Intel) (#481) * Implement proper voltage control (AMD, Intel) * Misc fixes * Misc * Reduce Minimum values on RyzenAdj CoAll and CoGfx * UI: Fixed an issue when toggling hotkeys with gamepad * UI: Fixed an issue when toggling hotkeys with gamepad * UI: Added tooltip buttons for voltage related components * UI: Add missing tooltips * build 0.28.2.3 * Improved: InputsManager modifier keys handling * build 0.28.2.4 * Misc * Fixed: hacky, fix broken profiles with Turbo and Toggle enabled across all actions * Fixed: AYANEO Air Plus EC logic * Device support: Implement SuiPlay 0X1 support (tentative) * build 0.28.2.5 * Fix MYSTEN company name * Fixed: AYANEO (Legacy, Modern) charge bypass logic * build 0.28.2.6 * Device support: Add missing SuiPlay 0X1 image * Fixed #1234 by @GopherTheCoder * Misc * Fixed: Issue where input duration slider wouldn't be displayed on layout editor * Fixed: Rare crash issue when editing a layout * Device: Change GPD Win 5 max TDP to 85W * Implemented new hotkey: Controller status (Connected, Disconnected) * Implemented new layout action: Absolute mouse position * Updated libaries: SDL3, LibreHardwareMonitor, RAMSPDToolkit-NDD * Added new action modifier key: LWin * Hotkey: New command type: PowerShellCommands * UI: Ask user before deleting hotkeys * Misc fix * Ported EnhancedSleep and ReSleep from SuspendedNTime from @BassemMohsen * Fix missing ledColor vars on AYANEO CEc devices * Fixed: ADLX Probe * Fixed ADLX Probe * Fixed ADLX Probe * Tentative: Fix ADLX Probe (#482) * Fixed: missing ryzenAdj checks * fix: make the toggle state shared and match the real status (#1343) Signed-off-by: Pedro Parra Ortega <pedro.parraortega@enreach.com> * UI: Misc improvements * feat: add support to delay action bindings (#1345) * fix: correct shared toggle state and support delayed actions (#1347) * fix: correct shared toggle state and support delayed actions * Update HandheldCompanion/Actions/MouseActions.cs ignore suggested actions Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Improve MouseActions MoveToPrevious (#483) * tentative * improve code * misc * Misc UI tweaks * feat: add triggers support for shift actions (#1350) * build 2.8.3.0 * feat: correct shift logic and add support for shift combiantions (#1352) * Library: LibreHardwareMonitorLib updated to NET10 * Fixed GPD Win Max 2 (HX370) gyro/accelero axis * code cleanup * Feat/improve shif layouts (#1353) * feat: correct shift logic and add support for shift combiantions * fix: add backward compatibility * Fixed: Gyroscope/Accelerometer angles for: GPD Win 5, GPD Win Mini (8840U, HX370) * Misc * Fixed an issue where a controller wouldn't properly (re)plug after power cycling * Improved FSE compatibility. MainWindow will now properly resize, show, hide when FSE is enabled or disabled * Fixed a rare crash on HotkeyViewModel where Hotkey command buttonflags would be null * Misc * Fixed Quicktools behavior once FSE was summoned * Don't try and get artwork for explorer.exe * build 0.28.3.1 * merge --------- Signed-off-by: Pedro Parra Ortega <pedro.parraortega@enreach.com> Co-authored-by: Sanheiii <35133371+Sanheiii@users.noreply.github.com> Co-authored-by: Kvintilyanov Aleksandr <mops1k@users.noreply.github.com> Co-authored-by: pepordev <parraortega.pedro@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Fixed: Issues when trying to trigger hotkeys * Fixed: UI Issue when navigating into a page without IsEnabled controls * Improved: QuickHome, QuickApplications UI * build 0.27.0.10 * States fixes * Improved: Removed hacky controller manager await in benefits of more robust device manager arrival logic * Improved: Device management has new queuing logic * Improved: Quicktools L1/R1 will now circle within menu items * Filter SDL Events * Fixed: Restore default fan profile when fan mode is set to Hardware * Migrate some platform logic to PlatformManager We should move the PlatformToProfile logic to LibraryManager or PlatformManager * Fix Claw FanSpeed array * Implemented: new commands ButtonCommands replacing GuideCommands * Improve Action Type UI experience * Fixed: Button to TriggerActions * Improved: ButtonMapping and AxisMapping migrated to SettingsExpander and SettingsCard * Improved: GyroMapping and TriggerMapping migrated to SettingsExpander and SettingsCard * Improved: MouseAction Acceleration is now relying on action delta (ms) to compute velocity memory * Misc UI tweaks * build 0.27.0.11 * Misc UI improvements * Fixed: OEM buttons will now properly inherit default behavior * misc * misc * Fixed: Input/Hotkey injection on dummy controllers * Revert: Improved: Device management has new queuing logic * Fixed: Rog Ally Xbox Adaptive Controller support * Improved: Allow users to edit default power profiles * Edit a few default settings * build 0.27.0.12 * Improve overall fan management and ROG Ally TDP (#466) * (Tentative) Fix TDP/Fan issues * Misc: migrate powerProfile management to IDevice * update lib * Improved: Controller management * Implemented: Per-device hotkeys (#467) * Improved: Controller management * Improved: Per-device hotkeys * build 0.27.0.13 * Fixed: Profile update when resolution or refresh rate is changed * Misc (#468) * Tentative fix buttons RGB control * Fixed: Hotkey deserialization with old ButtonFlags * code cleanup * Fixed: missing library: YamlDotNet * Fixed: hotkey duplication * Updated LibreHardwareMonitorLib * Fixed: Zotac Gaming Zone VRAM control * Fixed: LegionR/LegionL inverted buttons on Legion Go S * build 0.27.0.14 * Improve session and device management (#469) * Improved: HC won't wait until session is ready anymore, except for keyboard input management * Fixed: Device management asynchronous refresh * Fixed: Device management asynchronous refresh * oups * Revert "Fixed: Profile update when resolution or refresh rate is changed" This reverts commit 0fa4512. * only update if necessary * Update SDL3.dll * Device support: Add ONEXPLAYER X1 AMD (weird ProductName: ONEXPLAYER X1z) * Improved: Installation script to add WinRing0x64.sys and HandheldCompanion.sys to defender exclusion list * build 0.28.0.0 * Update libraries * Force refresh platform catalog when scanning * Update LibreHardwareMonitorLib * RyzenAdj 0.18.0 - Update for ryzen_smu 0.1.7 - Support: Strix Point - Support: Dragon Range - Support: Fire Range - Support: HX370 (Pro) - Support: Krackan Point * Fixed: UI not rendering after GPU acceleration is toggled on/off not perfect.. * DClawController to use GenericController instead of raw HidDevice * build 0.28.0.1 * Reduce CPU usage (#470) * Reduce cpu usage on DInputController * Reduce CPU usage from HidLibrary * Reduce CPU usage a pressure on ThreadPool with RaiseInputsUpdatedAsync * Reduce CPU usage from RadioMonitor * Update OverlayModel.xaml * build 0.28.0.2 * Update Resources.fr-FR.resx Traduction par: Moi952 * Improved: UI freeze workaround * build 0.28.0.3 * Update libs * Improve controller management - Properly unhide (with power cycling) if HIDuncloakonclose is set - Wait until any rumble is complete before power cycling * ForceRecompose windows on system resume * Add PawnIO support for LibreHardware 0.9.5 - Fixes CPU power/temperature reading * build 0.28.0.4 * Fixed: Keyboard chord hotkey trigger on SDL-based controllers * Improved: CPU usage on LibreHardwareLibrary * Fixed: Setting a profile favorite subprofile * Improved: ProfilesPage shows saved windows settings alongside live * Revert "Fixed: Keyboard chord hotkey trigger on SDL-based controllers" This reverts commit d0a9483. * Improved: SDL controllers will use Tick() logic rather than inputs pumping * Fixed: MainWindow visibility on Task View when minimized * Updated: LibreHardwareMonitorLib * build 0.28.0.5 * Misc * Improved: Window State/Visibility logic * Misc * Improved: UIGamepad navigation with HyperlinkButton * Implemented: New controller setting: HIDuncloakondisconnect * Fixed: MSI Claw 10F BIOS support * Resolve startup crash and refactor joystick input (#472) * fix(app): Crash caused by Logger not being loaded in the App constructor. * chore(i18n): Improve translate * refactor(Input): Implement angle-based logic for joystick directions * refactor(Input): Rename MotionDirection to DeflectionDirection * Implement faster/better resume from sleep (#473) * Tentative: speed up resume * build 0.28.0.6 * Migrate settings to ProgramData * Improve task manager to speed startup * Revert "Improve task manager to speed startup" This reverts commit c5b93cf5d36eea4ee243b729fe0a1385a0558a19. * misc * build 0.28.0.7 * Use LocalApplicationData * improve resume * Fix KeyboardChord.GetChord * (tentative) force recompose on system resume * misc * wait for user to reply on settings before going further, also use Windows 11 theme * Misc UI improvements * misc * misc * More work on settings migration * Update HotkeysManager.cs * Update App.xaml.cs * misc fix * misc * misc * Fix AsusACPI on system resume * Tentative: Fix stalled UI on system resume * (tentative) fix UI not rendering on resume * (tentative) fix UI not rendering on resume * build 0.28.0.8 * Prevent bottom buttons from getting focus * Implemented: New options for Layout Mapping : Trigger to Button - Turbo, Interruptable, Toggle * (tentative) figure detect S3/S4 sleep states resume * restore arbitrary sleep/resume delay from long sleep * Fix IActions variable naming and usage (HasXXX) * Fixed: Device illustration on about page * Fix * Fixed: SDL trigger to L/RSoft L/RFull * Misc fixes * Device Support: Legion Go 2 (#459) * WIP * Misc * More work * Fixed: Controller picking logic on plug/unplug * Fixed: Translation causing notify icon (task tray) buttons to fail when translated * Improved: Legion Go (1, 2) performance mode TDP (25W) * Fixed: Legion Go 2, internal gyro/accelero angles reading * Fixed: Controller picker * Fixed: Crash on ProcessRenderMode * Update SDL3: 3.2.24 https://github.com/libsdl-org/SDL/releases/tag/release-3.2.24 * Fixed: AYANEO FLIP DS 1S CEcControl_SetSecDispBrightness() * Misc - Migrate dump crashes to {localappdata}\CrashDumps - Create zip backup when migrating {mydocuments}\HandheldCompanion * Prevent the application from starting while we wait for user input * Fixed: Misc crash/exceptions * Fixed: Support over legacy IActions * Fixed: AYANEO Flip DS 2nd screen ON/OFF toggle * Improved: MultimediaManager GetDisplayFriendlyName() * build 0.28.1.0 * Device support: AYANEOFlip1SDS * build 0.28.1.1 * Misc fixes * Remove WinRing0 (#475) * Remove WinRing0 * Fixed: Issue with IGDB background download * Misc * build 0.28.2.0 * Use LpcIO instead of LpcPort * Update OpenLibSys.cs * tentative * tentative * tentative * tentative Use LpcIO instead of LpcPort Update OpenLibSys.cs tentative tentative * Revert "tentative" This reverts commit 3ce974aa7fb369b851cfbc3f9dfbdc98c226c635. * tentative * misc * more work * tentative * more work * Fixes * oups * oups * Fix iss * Update LibreHardwareMonitorLib.dll * build 0.28.1.2 (#476) - Restored WinRing0 for TDP manipulation (until we find an alternative based on PawnIO) * Restore missing WinRing0 force unload * Fixed: Toast hanging * Fixed: UI hanging on startup (WHY !?) * Fixed: Prevent GPUmanger from holding onto DeviceManager while waiting for MultimediaManager to be ready * Improved: Offset non-UI tasks away from UI thread * build 0.28.1.3 * Fixed: UIHelper default DispatcherPriority * Fixed: Add missing WinRing0x64.dll * Fixed: Prevent failed processor initialization from crippling HC startup sequence * build 0.28.1.4 * Improved: Library UI with with Favorites profiles * Fixed: Wrong profile name on overwrite warning (profiles page) * Implement Msiapcfg (#477) * Tentatively add msiapcfg support * Misc fixes * build 0.28.1.5 * Improved UI: SteamGrid Logo parsing and LibraryFamily checkboxes * Update libraries (build 0.28.1.6) * Implemented: Support over Xbox Rog Ally (X/NonX) (#478) * Implemented: Xbox Rog Ally support (WIP) * Fixed: Deploy default power profiles with default profile Should have been done LONG AGO !! * Fixed: MSI Claw (all models) max fan speed (150%) * Update XboxROGAlly.cs * Implemented: Add support over Xbox ROG Ally X/NonX * Change battery overlay widget to better logic and display (#1306) * Refactor Overlay rendering logic to strategy design pattern * Fix ai comments * Add widget system with factory * Fix some AI comments * Add level selection for overlay widgets. Refactor strategies (use widgets. * Fix level for cpu widget in full overlay strategy * - change battery left to hours and minutes format * - add format for hours * - fix after merge from `main` * - little refactoring * - add hours format * - add return if null time left * good to go --------- Co-authored-by: Lesueur Benjamin <benjamin.lesueur@live.com> (cherry picked from commit 283187b) * Fixed: Battery reading without LibreHardwareMonitor (while we wait for a fix) * build 0.28.1.7 * Fixed: Add missing UseOpenLib declarations * Implemented: Task view function * Improved: Task manager commands * build 0.28.1.8 * Fixed: AYANEO Flip 1S DS/KB compatibility * Move to Windows 11 SDK Windows 10 is EOL as of October 14 2025 * Add default AYANEO power profiles (Extreme, Balanced, Saving power) * Updated: Several libraries * Fixed: Error on null processEx * oups * Fixed: Incorrect overwrite message displayed when creating a new profile * Fixed: A crash occuring on OneXPlayerMini and OneXPlayerOneXFly devices * Fixed: A rare crash happening on InputsManager * Update LibreHardwareMonitorLib.dll * UI: Improve LibraryPage image sizes * Fixed: CPU usage from LibreHardware ADLX implementation (rely on ours instead) * Library: Update SDL to 3.3.2 * build 0.28.1.9 * Revert "Library: Update SDL to 3.3.2" This reverts commit 6353143. * UI: Misc improvements * Library: Updated SDL to 3.3.2 * UI: Added Power dropdown button to Quicktools (Lock, Sleep, Shutdown, Restart) * Compatibility: Add Moonlight virtual controller detection and support * Misc * build 0.28.1.10 * Fixed: Prevent empty executable paths from being added to profile * UI: SplashScreen no longer is AlwaysOnTop * Library: Update HidHide, Sentry and LibreHardwareMonitor * Fixed: Touchpad support on Legion Go (1/2) * Fixed: OneX/AOKZOE OEM button support * Implemented: New commands Copilot Voice * Fixed: Joystick to button/keyboard/mouse click (axis threshold range) * Library: Updated WindowsAPICodePack * build 0.28.1.11 * Fixed: Crash caused by a race condition from VirtualManager when waking-up system * UI: Improve toast manager (now has ability to generate clickable toasts) * Improvements: CopilotVoiceCommands now also resize the Copilot window * Fixed: CPU leak when HidDevice is torn off * Fixed: Rare crash on null Controller * Misc * build 0.28.1.12 * Fixed: AYANEO Flip DS missing Close() override * Misc * Controller: Fixed Neptune Controller IsReady, IsConnected checks * Implement .NET10 (#479) * (WIP) implement NET10 support * Update install script * Implement RyzenAdj set_coall() * Fixed: Steam Deck GPU reading * Update libraries to NET10: LibreHardware, ViGEm.Client * Update Nefarius.ViGEm.Client.dll * Device support: GPD Win 5 (WIP) * Improved: Process manager will now ignore Taskbar and Shellhost * Updated: Libraries * build 0.28.2.1 * Improved: Process manager ForegroundStaging and XamlExplorerHostIslandWindow are now Restricted * Improved: Process manager ApplicationManager_DesktopShellWindow is now Restricted * build 0.28.2.2 * Library: Update iNKORE.UI.WPF.Modern * Device support: Improve overall AOKZOE and ONEX compatibility (fixes OEM button usage and improve FAN/LED management) (#480) * Tentative: Fix OneX button lock * Fixed: Several issues with OneX devices and IsOpen, IsReady checks as well ad HidDevice pickup on OneXFly * Device support: OneXPlayer G1 * Improved overall ONEX/AOKZOE device support backported some logic from HHD * Device support: Add DynamicLightingSecondLEDColor to all AYANEO devices * Implement proper voltage control (AMD, Intel) (#481) * Implement proper voltage control (AMD, Intel) * Misc fixes * Misc * Reduce Minimum values on RyzenAdj CoAll and CoGfx * UI: Fixed an issue when toggling hotkeys with gamepad * UI: Fixed an issue when toggling hotkeys with gamepad * UI: Added tooltip buttons for voltage related components * UI: Add missing tooltips * build 0.28.2.3 * Improved: InputsManager modifier keys handling * build 0.28.2.4 * Misc * Fixed: hacky, fix broken profiles with Turbo and Toggle enabled across all actions * Fixed: AYANEO Air Plus EC logic * Device support: Implement SuiPlay 0X1 support (tentative) * build 0.28.2.5 * Fix MYSTEN company name * Fixed: AYANEO (Legacy, Modern) charge bypass logic * build 0.28.2.6 * Device support: Add missing SuiPlay 0X1 image * Fixed #1234 by @GopherTheCoder * Misc * Fixed: Issue where input duration slider wouldn't be displayed on layout editor * Fixed: Rare crash issue when editing a layout * Device: Change GPD Win 5 max TDP to 85W * Implemented new hotkey: Controller status (Connected, Disconnected) * Implemented new layout action: Absolute mouse position * Updated libaries: SDL3, LibreHardwareMonitor, RAMSPDToolkit-NDD * Added new action modifier key: LWin * Hotkey: New command type: PowerShellCommands * UI: Ask user before deleting hotkeys * Misc fix * Ported EnhancedSleep and ReSleep from SuspendedNTime from @BassemMohsen * Fix missing ledColor vars on AYANEO CEc devices * Fixed: ADLX Probe * Fixed ADLX Probe * Fixed ADLX Probe * Tentative: Fix ADLX Probe (#482) * Fixed: missing ryzenAdj checks * fix: make the toggle state shared and match the real status (#1343) Signed-off-by: Pedro Parra Ortega <pedro.parraortega@enreach.com> * UI: Misc improvements * feat: add support to delay action bindings (#1345) * fix: correct shared toggle state and support delayed actions (#1347) * fix: correct shared toggle state and support delayed actions * Update HandheldCompanion/Actions/MouseActions.cs ignore suggested actions Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Improve MouseActions MoveToPrevious (#483) * tentative * improve code * misc * Misc UI tweaks * feat: add triggers support for shift actions (#1350) * build 2.8.3.0 * feat: correct shift logic and add support for shift combiantions (#1352) * Library: LibreHardwareMonitorLib updated to NET10 * Fixed GPD Win Max 2 (HX370) gyro/accelero axis * code cleanup * Feat/improve shif layouts (#1353) * feat: correct shift logic and add support for shift combiantions * fix: add backward compatibility * Fixed: Gyroscope/Accelerometer angles for: GPD Win 5, GPD Win Mini (8840U, HX370) * Misc * Fixed an issue where a controller wouldn't properly (re)plug after power cycling * Improved FSE compatibility. MainWindow will now properly resize, show, hide when FSE is enabled or disabled * Fixed a rare crash on HotkeyViewModel where Hotkey command buttonflags would be null * Misc * Fixed Quicktools behavior once FSE was summoned * Don't try and get artwork for explorer.exe * build 0.28.3.1 * Fixed: Crash on null ProfilesPage.selectedProfile when ControllerManaget.GetDefault() is called * Fixed: Crash on unsynced Layout on Clone() * Layout: Allow 100% outer deadzone on triggers to mimic clickable trigger * Misc * Improve controller management (logic, UI, notifications) (#485) * WIP * More work * build 0.28.3.2 * feat: add axis input support for move (absolute) action and fix tick interval for start delay) (#484) Signed-off-by: Pedro Parra Ortega <parraortega.pedro@gmail.com> * MasterInterval slider * Improve MasterInterval * Fixed: SensorsManager Suspend/Resume on sleep * SDL: Updated gamecontrollerdb * Library: SDL 3.3.6 * feat(shift): Add support for strict and any logic (#486) * UI: Improve UI navigation on embedded NavigationView (as seen in LayoutPage) * Further improve UI gamepad navigation * code cleanup * Misc UI updates * UI: Misc * UI: Misc * feat: fixed translations and added shortcut for layout (#487) * Restore subprofiles on library page. That's an intended behavior * Fixed: Race condition crash on TimerManager * Fix GPD WIN 5 buttons * Feat/improve layout settings (#489) * feat: improve layout system * fix: correct inherit and added missing configurations * fix: correct visibility and conditions on layout configs (#490) * fix: correct axis/trigger configurations visibility (#491) * Improve Profiles page UI (#488) * temp tests * more work * more work * more work * more work * more work * misc * More work * fix * more work * more work * Misc * Improved SteamGridDb, will now capture official artworks first * Misc UI tweaks * Misc fixes * more work * more work * Misc UI * Misc UI tweaks * code cleanup * build 0.28.3.3 --------- Signed-off-by: Pedro Parra Ortega <pedro.parraortega@enreach.com> Signed-off-by: Pedro Parra Ortega <parraortega.pedro@gmail.com> Co-authored-by: Sanheiii <35133371+Sanheiii@users.noreply.github.com> Co-authored-by: Kvintilyanov Aleksandr <mops1k@users.noreply.github.com> Co-authored-by: pepordev <parraortega.pedro@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
fixes #1352
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.