-
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
feature - default layout option on profiles #827
Conversation
WalkthroughThe software has been updated to allow users to set a default layout for profiles. A new function and property have been added to manage default layouts, and the UI has been updated to include a checkbox for setting this preference. Localization files have been updated to include the new option across various languages, ensuring a consistent user experience. Changes
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: 2
Configuration used: CodeRabbit UI
Files selected for processing (17)
- HandheldCompanion/Managers/ProfileManager.cs (1 hunks)
- HandheldCompanion/Misc/Layout.cs (2 hunks)
- HandheldCompanion/Properties/Resources.Designer.cs (1 hunks)
- HandheldCompanion/Properties/Resources.de-DE.resx (1 hunks)
- HandheldCompanion/Properties/Resources.es-ES.resx (1 hunks)
- HandheldCompanion/Properties/Resources.fr-FR.resx (1 hunks)
- HandheldCompanion/Properties/Resources.it-IT.resx (1 hunks)
- HandheldCompanion/Properties/Resources.ja-JP.resx (1 hunks)
- HandheldCompanion/Properties/Resources.pt-BR.resx (1 hunks)
- HandheldCompanion/Properties/Resources.resx (1 hunks)
- HandheldCompanion/Properties/Resources.ru-RU.resx (1 hunks)
- HandheldCompanion/Properties/Resources.zh-CN.resx (1 hunks)
- HandheldCompanion/Properties/Resources.zh-Hant.resx (1 hunks)
- HandheldCompanion/Views/Pages/LayoutPage.xaml (1 hunks)
- HandheldCompanion/Views/Pages/LayoutPage.xaml.cs (2 hunks)
- HandheldCompanion/Views/Pages/ProfilesPage.xaml.cs (2 hunks)
- HandheldCompanion/Views/QuickPages/QuickProfilesPage.xaml.cs (1 hunks)
Files skipped from review due to trivial changes (11)
- HandheldCompanion/Properties/Resources.Designer.cs
- HandheldCompanion/Properties/Resources.de-DE.resx
- HandheldCompanion/Properties/Resources.es-ES.resx
- HandheldCompanion/Properties/Resources.fr-FR.resx
- HandheldCompanion/Properties/Resources.it-IT.resx
- HandheldCompanion/Properties/Resources.ja-JP.resx
- HandheldCompanion/Properties/Resources.pt-BR.resx
- HandheldCompanion/Properties/Resources.resx
- HandheldCompanion/Properties/Resources.ru-RU.resx
- HandheldCompanion/Properties/Resources.zh-CN.resx
- HandheldCompanion/Properties/Resources.zh-Hant.resx
Additional comments: 7
HandheldCompanion/Views/Pages/LayoutPage.xaml.cs (2)
330-336: The logic for handling the default layout checkbox state is sound. However, it's important to ensure that the
LayoutManager.GetDesktop()
method is robust and handles edge cases properly, as it's being used to determine whether the checkbox should be enabled.546-560: The event handler
CheckBoxDefaultLayout_Checked
correctly updates theIsDefaultLayout
property of the current layout and handles the case where there is an existing default layout that needs to be unset. However, it's crucial to ensure thatProfileManager.UpdateOrCreateProfile
method properly handles concurrency and potential race conditions, especially if profiles can be updated from different parts of the application simultaneously.HandheldCompanion/Misc/Layout.cs (2)
14-17: The addition of the
IsDefaultLayout
property is a good way to track whether a layout is the default. However, ensure that there are no existing layouts that need to be migrated to use this new property. If there are, a migration script or a one-time update process should be implemented.62-70: The
Clone
method has been correctly updated to ensure that theIsDefaultLayout
property is set tofalse
when cloning a layout. This prevents the cloned layout from unintentionally being marked as the default. This is a good practice to avoid side effects when cloning objects.HandheldCompanion/Managers/ProfileManager.cs (1)
- 532-535: The new method
GetProfileWithDefaultLayout
is introduced to retrieve profiles with a default layout. This method uses LINQ'sFirstOrDefault
which is a good choice for this operation as it is concise and efficient for the purpose. However, it's important to ensure that theLayout
class has anIsDefaultLayout
property and that it is correctly set across the application to avoid unexpected behavior.HandheldCompanion/Views/Pages/ProfilesPage.xaml.cs (2)
15-18: The addition of
System.Linq
is appropriate for the use of LINQ queries or methods that may be present in the updated code. Ensure that the usage of LINQ does not introduce performance issues, especially in loops or frequently called methods.258-263: The logic to clone the layout from the default profile if available is implemented correctly. However, it is important to ensure that the
Clone
method in theLayout
class properly duplicates all necessary properties and does not reference any mutable objects from the originalLayout
object to avoid unintended side effects.
|
||
// create profile | ||
currentProfile = new Profile(currentProcess.Path); | ||
currentProfile.Layout = LayoutTemplate.DefaultLayout.Layout.Clone() as Layout; | ||
currentProfile.Layout = (ProfileManager.GetProfileWithDefaultLayout()?.Layout ?? LayoutTemplate.DefaultLayout.Layout).Clone() as Layout; | ||
currentProfile.LayoutTitle = LayoutTemplate.DesktopLayout.Name; | ||
currentProfile.TDPOverrideValues = MainWindow.CurrentDevice.nTDP; | ||
|
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 cloning of the layout object should ensure that the IsDefaultLayout
property is set to false
after cloning, as per the changes in Misc/Layout.cs
. This is to prevent the cloned layout from being incorrectly marked as a default layout. If this is not handled in the Clone
method itself, it should be explicitly set here after cloning.
- currentProfile.Layout = (ProfileManager.GetProfileWithDefaultLayout()?.Layout ?? LayoutTemplate.DefaultLayout.Layout).Clone() as Layout;
+ Layout clonedLayout = (ProfileManager.GetProfileWithDefaultLayout()?.Layout ?? LayoutTemplate.DefaultLayout.Layout).Clone() as Layout;
+ clonedLayout.IsDefaultLayout = false;
+ currentProfile.Layout = clonedLayout;
Commitable 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.
// create profile | |
currentProfile = new Profile(currentProcess.Path); | |
currentProfile.Layout = LayoutTemplate.DefaultLayout.Layout.Clone() as Layout; | |
currentProfile.Layout = (ProfileManager.GetProfileWithDefaultLayout()?.Layout ?? LayoutTemplate.DefaultLayout.Layout).Clone() as Layout; | |
currentProfile.LayoutTitle = LayoutTemplate.DesktopLayout.Name; | |
currentProfile.TDPOverrideValues = MainWindow.CurrentDevice.nTDP; | |
// create profile | |
currentProfile = new Profile(currentProcess.Path); | |
Layout clonedLayout = (ProfileManager.GetProfileWithDefaultLayout()?.Layout ?? LayoutTemplate.DefaultLayout.Layout).Clone() as Layout; | |
clonedLayout.IsDefaultLayout = false; | |
currentProfile.Layout = clonedLayout; | |
currentProfile.LayoutTitle = LayoutTemplate.DesktopLayout.Name; | |
currentProfile.TDPOverrideValues = MainWindow.CurrentDevice.nTDP; |
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.
Sounds right indeed
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.
@Valkirie Great, I'll proceed with making the change to ensure that the IsDefaultLayout
property is correctly set to false
for cloned layouts. Thank you for confirming!
// create profile
currentProfile = new Profile(currentProcess.Path);
Layout clonedLayout = (ProfileManager.GetProfileWithDefaultLayout()?.Layout ?? LayoutTemplate.DefaultLayout.Layout).Clone() as Layout;
clonedLayout.IsDefaultLayout = false;
currentProfile.Layout = clonedLayout;
currentProfile.LayoutTitle = LayoutTemplate.DesktopLayout.Name;
currentProfile.TDPOverrideValues = MainWindow.CurrentDevice.nTDP;
This code snippet will replace the existing line in QuickProfilesPage.xaml.cs
to create a profile with a layout that is not marked as the default, adhering to the intended behavior of the cloning process.
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 property is set to false in the Clone() function.
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.
Looks like humans are talking. I'll be quiet for now. If you need me again, just tag @coderabbitai in a new comment.
IsChecked="True" | ||
Unchecked="CheckBoxDeviceLayouts_Checked" /> | ||
|
||
<ui:SimpleStackPanel | ||
HorizontalAlignment="Right" | ||
Orientation="Horizontal" | ||
Spacing="6"> | ||
|
||
<!-- Apply template --> | ||
<Button | ||
Name="ButtonApplyLayout" | ||
Click="ButtonApplyLayout_Click" | ||
Content="{x:Static resx:Resources.LayoutPage_ApplyTemplate}" | ||
IsEnabled="False" | ||
Style="{DynamicResource AccentButtonStyle}" /> | ||
|
||
<!-- Export layout --> | ||
<Button Name="ButtonLayoutSettings" Content="Export layout"> | ||
<ui:FlyoutService.Flyout> | ||
<ui:Flyout | ||
x:Name="LayoutFlyout" | ||
AreOpenCloseAnimationsEnabled="True" | ||
Opening="Flyout_Opening" | ||
Placement="Left"> | ||
<ui:SimpleStackPanel Width="400" Spacing="24"> | ||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{x:Static resx:Resources.LayoutPage_ExportLayout}" /> | ||
|
||
<ui:SimpleStackPanel Spacing="6"> | ||
<TextBox | ||
Name="LayoutTitle" | ||
HorizontalAlignment="Stretch" | ||
ui:ControlHelper.Header="{x:Static resx:Resources.LayoutPage_LayoutTitle}" /> | ||
<TextBox | ||
Name="LayoutDescription" | ||
HorizontalAlignment="Stretch" | ||
Click="LayoutExportButton_Click" | ||
Content="{x:Static resx:Resources.LayoutPage_Confirm}" /> | ||
<Button | ||
Name="LayoutCancelButton" | ||
Grid.Column="2" | ||
ui:ControlHelper.Header="{x:Static resx:Resources.LayoutPage_LayoutDesc}" /> | ||
<TextBox | ||
Name="LayoutAuthor" | ||
HorizontalAlignment="Stretch" | ||
Click="LayoutCancelButton_Click" | ||
Content="{x:Static resx:Resources.LayoutPage_Cancel}" /> | ||
</Grid> | ||
ui:ControlHelper.Header="{x:Static resx:Resources.LayoutPage_LayoutAuthor}" /> | ||
<CheckBox x:Name="ExportForCurrent" Content="{x:Static resx:Resources.LayoutPage_ExportCurrentController}" /> | ||
<CheckBox | ||
x:Name="SaveGameInfo" | ||
Click="SaveGameInfo_Toggled" | ||
Content="{x:Static resx:Resources.LayoutPage_SaveGameInfoLayout}" | ||
IsChecked="True" /> | ||
|
||
<!-- Separator --> | ||
<Separator | ||
BorderBrush="{DynamicResource SystemControlBackgroundChromeMediumBrush}" | ||
BorderThickness="0,1,0,0" | ||
Opacity="0.25" /> | ||
|
||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="5*" /> | ||
<ColumnDefinition Width="0.5*" /> | ||
<ColumnDefinition Width="5*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Button | ||
Name="LayoutExportButton" | ||
Grid.Column="0" | ||
HorizontalAlignment="Stretch" | ||
Click="LayoutExportButton_Click" | ||
Content="{x:Static resx:Resources.LayoutPage_Confirm}" /> | ||
<Button | ||
Name="LayoutCancelButton" | ||
Grid.Column="2" | ||
HorizontalAlignment="Stretch" | ||
Click="LayoutCancelButton_Click" | ||
Content="{x:Static resx:Resources.LayoutPage_Cancel}" /> | ||
</Grid> | ||
</ui:SimpleStackPanel> | ||
</ui:SimpleStackPanel> | ||
</ui:SimpleStackPanel> | ||
</ui:Flyout> | ||
</ui:FlyoutService.Flyout> | ||
</Button> | ||
</ui:SimpleStackPanel> | ||
</Grid> | ||
</ui:Flyout> | ||
</ui:FlyoutService.Flyout> | ||
</Button> | ||
</ui:SimpleStackPanel> | ||
</Grid> | ||
|
||
<CheckBox | ||
Name="CheckBoxDefaultLayout" | ||
Checked="CheckBoxDefaultLayout_Checked" | ||
Content="{x:Static resx:Resources.LayoutPage_SetAsDefault}" | ||
Unchecked="CheckBoxDefaultLayout_Checked" /> |
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 addition of the CheckBoxDefaultLayout
control is consistent with the feature being introduced. Ensure that the event handlers CheckBoxDefaultLayout_Checked
and CheckBoxDefaultLayout_Unchecked
(lines 208 and 210) are correctly implemented in the code-behind to handle the state changes of the checkbox. Also, verify that the Unchecked
event is correctly named; it seems to be a copy-paste error and should likely be CheckBoxDefaultLayout_Unchecked
instead of CheckBoxDefaultLayout_Checked
.
- Unchecked="CheckBoxDefaultLayout_Checked"
+ Unchecked="CheckBoxDefaultLayout_Unchecked"
Commitable 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.
<ui:SimpleStackPanel | |
Orientation="Vertical" | |
Spacing="6"> | |
<Grid> | |
<CheckBox | |
Name="CheckBoxDeviceLayouts" | |
Checked="CheckBoxDeviceLayouts_Checked" | |
Content="{x:Static resx:Resources.LayoutPage_ShowCurrentControllerTemplates}" | |
IsChecked="True" | |
Unchecked="CheckBoxDeviceLayouts_Checked" /> | |
<ui:SimpleStackPanel | |
HorizontalAlignment="Right" | |
Orientation="Horizontal" | |
Spacing="6"> | |
<!-- Apply template --> | |
<Button | |
Name="ButtonApplyLayout" | |
Click="ButtonApplyLayout_Click" | |
Content="{x:Static resx:Resources.LayoutPage_ApplyTemplate}" | |
IsEnabled="False" | |
Style="{DynamicResource AccentButtonStyle}" /> | |
<!-- Export layout --> | |
<Button Name="ButtonLayoutSettings" Content="Export layout"> | |
<ui:FlyoutService.Flyout> | |
<ui:Flyout | |
x:Name="LayoutFlyout" | |
AreOpenCloseAnimationsEnabled="True" | |
Opening="Flyout_Opening" | |
Placement="Left"> | |
<ui:SimpleStackPanel Width="400" Spacing="24"> | |
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{x:Static resx:Resources.LayoutPage_ExportLayout}" /> | |
<ui:SimpleStackPanel Spacing="6"> | |
<TextBox | |
Name="LayoutTitle" | |
HorizontalAlignment="Stretch" | |
ui:ControlHelper.Header="{x:Static resx:Resources.LayoutPage_LayoutTitle}" /> | |
<TextBox | |
Name="LayoutDescription" | |
HorizontalAlignment="Stretch" | |
Click="LayoutExportButton_Click" | |
Content="{x:Static resx:Resources.LayoutPage_Confirm}" /> | |
<Button | |
Name="LayoutCancelButton" | |
Grid.Column="2" | |
ui:ControlHelper.Header="{x:Static resx:Resources.LayoutPage_LayoutDesc}" /> | |
<TextBox | |
Name="LayoutAuthor" | |
HorizontalAlignment="Stretch" | |
Click="LayoutCancelButton_Click" | |
Content="{x:Static resx:Resources.LayoutPage_Cancel}" /> | |
</Grid> | |
ui:ControlHelper.Header="{x:Static resx:Resources.LayoutPage_LayoutAuthor}" /> | |
<CheckBox x:Name="ExportForCurrent" Content="{x:Static resx:Resources.LayoutPage_ExportCurrentController}" /> | |
<CheckBox | |
x:Name="SaveGameInfo" | |
Click="SaveGameInfo_Toggled" | |
Content="{x:Static resx:Resources.LayoutPage_SaveGameInfoLayout}" | |
IsChecked="True" /> | |
<!-- Separator --> | |
<Separator | |
BorderBrush="{DynamicResource SystemControlBackgroundChromeMediumBrush}" | |
BorderThickness="0,1,0,0" | |
Opacity="0.25" /> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="5*" /> | |
<ColumnDefinition Width="0.5*" /> | |
<ColumnDefinition Width="5*" /> | |
</Grid.ColumnDefinitions> | |
<Button | |
Name="LayoutExportButton" | |
Grid.Column="0" | |
HorizontalAlignment="Stretch" | |
Click="LayoutExportButton_Click" | |
Content="{x:Static resx:Resources.LayoutPage_Confirm}" /> | |
<Button | |
Name="LayoutCancelButton" | |
Grid.Column="2" | |
HorizontalAlignment="Stretch" | |
Click="LayoutCancelButton_Click" | |
Content="{x:Static resx:Resources.LayoutPage_Cancel}" /> | |
</Grid> | |
</ui:SimpleStackPanel> | |
</ui:SimpleStackPanel> | |
</ui:SimpleStackPanel> | |
</ui:Flyout> | |
</ui:FlyoutService.Flyout> | |
</Button> | |
</ui:SimpleStackPanel> | |
</Grid> | |
</ui:Flyout> | |
</ui:FlyoutService.Flyout> | |
</Button> | |
</ui:SimpleStackPanel> | |
</Grid> | |
<CheckBox | |
Name="CheckBoxDefaultLayout" | |
Checked="CheckBoxDefaultLayout_Checked" | |
Content="{x:Static resx:Resources.LayoutPage_SetAsDefault}" | |
Unchecked="CheckBoxDefaultLayout_Checked" /> | |
<CheckBox | |
Name="CheckBoxDefaultLayout" | |
Checked="CheckBoxDefaultLayout_Checked" | |
Content="{x:Static resx:Resources.LayoutPage_SetAsDefault}" | |
Unchecked="CheckBoxDefaultLayout_Unchecked" /> |
* improve XInputPlus behavior - when using injection: force physical controller whitelist - XInputPlus ini file will remove physical controllers from the array * update power cycling logic a bit, making it compatible with Generic controllers (non xinput) - would be good to use IsPowerCycling boolean to prevent a few calls from executing * fix hid hiding during powercyle * do not prevent user from setting UMC while game is whitelisted because of XinputPlus injection process * add missing xinput check on hid arrived * Fix logs missing date postfix, missing Serilog dependency (#29) * UI.WPF.Modern v0.9.17 * remove unused dependencies * Clean up system tray menu. (#30) * Migrate gyroscope out of Profile (Phase 1) (#31) * (wip) migrate gyro UI to layout page * leftover * more work * migrate a few TargetButtons and TargetAxis * add default value for GyroMapping AxisActions * that's better * better * default gyro values for MouseActions * restore UMC AdditionalSettings button, wip We need to move those additional components to the layout page (I guess) * remove unused redist * update package references downgrade PrecisionTimer.NET to 2.2.5.3 * ROG Ally, fix back button OEM3 hotkey usage after firmware update * fix quicktools autohide * feat(quicktools): cb3aaeb * hotfix * fix an issue with null gyroAction causing UI not to be updated * disabled QT AutoHide Disabled until we figure out a way to make it work without having to actually click on the window * fixes OneXPlayerMiniPro * fix QT focus * add mouse gyro support to QT * edits to DS4 and DualSense - add ButtonFlags.RightPadClick when dual-touch click - fix L2Soft and R2Soft icons * fix bad R2Full mapping on JSController * improve mapping controls layout a bit - reverted margin on non button mappings * add more enum text for DS4 and DualSense * move Advanced Motion Settings out of UMC expander * add support for AYANEO Air 1S (#32) * add a few more glyphs to DS4/DualSense * fix DualSense glyphs (Options, Share, Touchpad) * fix issues with motion trigger UI update when switching profiles * change MotionControlAdditional visibility based on currentProfile layout * make QT larger * Merge German Translation from Bagboii (#35) #748 * Localization update, service removal cleanup, enums added (#33) Co-authored-by: Lesueur Benjamin <[email protected]> * Improve Apply Layout Warning. (#34) Co-authored-by: Lesueur Benjamin <[email protected]> * fix missing </data> * Initial russian translation from Geckon01 (#36) 88698ce * Added Custom overlay mode from Contributor micdah #750 * Localization update (#37) * Add localization for various hardcoded UI elements. * All language files cleanup and update * fixed known issues with QT layout management The Motion control settings content bit is initially empty for the default profile until you create a profile for the proces in question and then disable the profile again. Motion control settings don't work until we have activated the layout, perhaps we should add that to quicktools? Style of input could probably use a name change Output device also has mouse scroll wheel if mouse is selected, I doubt we will use that As mentioned the sensitivity sliders don't seem to match what's in the additional settings. * update QT UI (Profiles page) * update QT * update installer script * fix AYANEO 1S OEM buttons * remove unused using(s) * enable/disable QT UI when no process is detected * apply default profile on startup * Aldx update (#38) * update ADLX Library Thanks to @JamesCJ60 * add missing dlls * oups * build 0.18.0.1 * fix an issue with layout manager * fix typo, we should Close() device not Open() it when going to sleep * (re)implementation of XInput UserIndex's half-baked guessing logic (#39) XInputController.TryGetUserIndex() * improve layout page update logic - update layout page only if currently browsed layout has been modified * simplify SteamDeck controller management logic, make it just work... if device is Steam Deck, set HIDcloakonconnect to False on first start * implement CustomSettingsProvider new UserConfigPath is %localappdata%\HandheldCompanion\user.config * Update from mainline (#40) * ROG Ally, fix back button OEM3 hotkey usage after firmware update. (#757) * feat(quicktools): show time based (#762) * Update Resources.es-ES.resx (#747) Change bad words * German Translation is done (#748) * German Translation is done * Translation Fix 2 Fixed German Translation, One was in the English Tab. Did further fixes, changing all "Playstation DualSense" to "PlayStation DualSense". * Added credits. * Fixed Credits being in the App Description, added Bagboi to AboutPage.xaml and changed CasperH20 to Casper H2O, as requested by Casper. --------- Co-authored-by: Bagboi <[email protected]> * Initial russian translation (#746) * Added Custom overlay mode (#750) * Added Custom overlay mode Keeps RTSS and HWINFO running, but without injecting / refreshing own OSD UI into it, relying on the user to configure their own overlay in RTSS * Renamed new level to `External` * Tweaks to changing RTSS profile properties, inspired by RTSS SDK docs: ```c++ // HotkeyHandlerWnd.cpp if (m_rtssInterface.SetProfileProperty(lpProperty, (LPBYTE)&dwValue, sizeof(dwValue))) { m_rtssInterface.SaveProfile(lpProfile); m_rtssInterface.UpdateProfiles(); } ``` * Fixes issue where `EnableOSD` is called before RTSS is started This happens when HC is started, as profile is applied before platform manager starts RTSS, meaning the `EnableOSD` call doesn't get through. Put logic of toggling OSD into platform manager, to ensure it's properly set whenever RTSS is started AND whenever needs change related to `OnScreenDisplay` * build 0.18.0.1b (#764) * Update publish-hc.yml * Update Resources.es-ES.resx (#766) Updates in traduction --------- Co-authored-by: CasperH2O <[email protected]> Co-authored-by: oolong tea <[email protected]> Co-authored-by: Miguel Ledesma <[email protected]> Co-authored-by: Bagboii <[email protected]> Co-authored-by: Bagboi <[email protected]> Co-authored-by: Andrew <[email protected]> Co-authored-by: Michael Dahl <[email protected]> * Improve HidHide (#41) * improve HID hiding * make hidhide more robust * fix powercycling * further improve the (un)hiding UI experience * Implement Vangogh support (Steam Deck) (#42) * port VangoghGPU support from SteamDeckTools * more work * should allow GPU to get its original frequency back * prevent HC from messing with RTSS OSD value * implement Steam Xbox Controller Enhanced Features Driver detection (#43) * implement SteamNeptuneDesktopWarning * stop using Process.MainModule whenever we can should prevent a few Win32Exception from being raised @CasperH2O * Use Manaul TDP slider for max AutoTDP range (#44) * Use manual TDP limit for AutoTDP max * Small cleanup. * Fix TDP updating if no profile is actively setting TDP edge case * stop using slow GetPathToApp * fix an issue freezing the UI thread * proof of concept: implement gyro/joystick weight logic (#45) * proof of concept: implement gyro/joystick weight logic * Update gyro joystick weight to make it simpler Works, but is not correct, see first todo. * use aAction.maxWeight, todo: make me UI configurable * implement UI * don't bother updating Layout UI if user is not looking at it anyway * fix quick profiles Slider_GyroWeight.Value value convert --------- Co-authored-by: CasperH2O <[email protected]> * set a few vars to string.Empty * Gyro weight, update default, use improved circular length for joystick (#46) * Gyro weight, update default, use improved circular length for joystick * Don't call ImproveCircularity() here If needed for joystick, it should be enforce on mapped AxisActions instead --------- Co-authored-by: Lesueur Benjamin <[email protected]> * XUsbDevice_DeviceArrived improvement (#47) * test this @CasperH2O * move XInputUserIndex init to PnpDetails * copy previous user.config to expected path * use const string UserConfigFileName * display Indeterminate ProgressBar while controller visibility is being changed * build 0.18.0.2 * while this was a good idea, the format is now different and it just doesn't work * prevent crash when power cycling SteamController(s) * fix an issue with steam platform stopping/stopped detection * add missing SettingsPath check/creation * add support for preview net8.0 * improve file management would still deserve some love * fix IsFileWritable() * further improve XInputPlus logic * build 0.18.0.3 * add support for ONEXPLAYER 2 PRO ARP23P (non eva) * Add support for Rog Ally ACPI/HidLibrary (#48) * working on rog ally * Implement proper RogAlly LED control - Migrate from HidSharp to HidLibrary - Implemented AuraMode, AuraSpeed * LED features, initial UI. * Functional LED control from GUI. * implement device page - migrated TDP override - migrated LED control * trying to improve bluetooth controller support - implemented a PowerCycle substitue for bluetooth device --------- Co-authored-by: CasperH2O <[email protected]> * Addition of GPD Win 4 2023 (#49) * Setup dotnet 8 SDK * more work on bluetooth controller support - HID only devices should work just fine now. - XINPUT devices requires the user to turn them off/on. * oups * improve logic on Bluetooth XInput controllers * fix missing FirstStart check * go home ben, you're drunk * add controller SetLightColor() logic (wip) * add SetLightColor() to DualSense * GPD Win 4 2023 Add fan control (#50) * fix issues with Rog Ally buttons * Icon updates (#52) * Update PromptFont .otf file. * Update SteamDeck back button icons. * start implementing OEM button Icon support * implement ROGAlly GetGlyph() * Hotkey page to also use device icons. * Hotkey page use regular and OEM icons. * Provide all unique devices with their respective OEM keys. --------- Co-authored-by: Lesueur Benjamin <[email protected]> * Implement power profile, fan control and new UI (#53) * implement fan chart (wip) * improve UI * implement Performance page * rename PowerProfile to PowerScheme * implementing PowerProfileManager (wip) * simplify GetType() comparison * more work * more work * trying to wire cpu temp to fan speed (wip, dirty) * introduce fanmode, average and aggressivity logic to fanprofile * add support for vangogh cpu fan * oups * UI fan chart is now linked to profile fanspeeds array * more work, won't compile yet * more work, it compiles now * more work, migrating more settings to power profile * more work on UI * more work * quick profiles page is almost done * misc * leverage PowerMode enum for PowerProfile Guid also * Show tooltip on keyboard focus * add idevice Tjmax var * we shouldn't allow users to modify some of default profile settings * fix painful behavior where gamepad focus manager would force switch for first navigation view item * more work * better * avoid infinite profile update loop * add Name field to pages * update logo * fix UI issue when removing power profile * improve gamepad navigation experience * update UI (wip) * fix an issue with actions on quick profiles page * more work on UI and resx * fixed an issue with locks on quickhomepage * (re)enable hardware rendering on quicktools (temp) * implement wifi/bluetooth toggles on Quick Settings page * fix * fix * more work on UI * update quick performance page based on power profile name * implement OpenHardwareMonitor platform * more work on UI, focusing on Performance and Quick Performance pages * more work on performance and quick performance pages * migrate MotionInput enums * implement IDevice power profile fan presets * prevent crash on null asusACPI we might want to add it to IsReady() ? * improve VirtualControllerForceOrder we might want to add a fail-safe * fix asusACPI checks * fix fan preset * fix touch experience with fan control * improve SetFanControl() on RogAlly * improve Chart Touch experience * backport 455a73a * prevent crash by using IsOpen on IDevice * use IsOpen on RogAlly * Functional Bias Lighting. (#51) * Functional Bias Lighting. * Color, move away from HEX (bugged) * Tweaks * Remove SetLedStatus in favor of more simplicity * Fix unintentional temporary settings * use true screen size to prevent crash when accessing device var * Fix left LED average color area. Bias lighting frequency tweak. * slight logic update * fix crash * fix manager start order * Add try catch for "device". Cleanup. * Rework LED settings level into dropdown. * Add enum, fix color reset biaslighting, use device capability. * Cleanup, add GetColor to SettingsManager * Add localization and commentary. * Make Ayaneo2S based on Ayaneo2. * Introduce AyaneoLED class for multi device usage. * Initial port of LEDControl prototype for Ayaneo, does not compile. * Use OpenLibSys temporarily. * Add LED device capabilities for Ayaneo. * Create new object, add control functions where applicable. * Improve AyaneoLED, split LED color and brightness device capability * Update AYANEOLED.cs * LED Control, add disabled option (default), no HC control over LEDs. * Hide or show LED options based on mode selection. * Swap zone and RGB component for loop order * Tweak visibility for designer. * Disable Ayaneo Air Plus LED control for now. * Prepare for Battery status changes in Ayaneo LED * Update ECDetails naming, add Ayaneo Air Plus LED Control support. * that's better * Ayn initial LED and fan control code. * fix? AYN * improve AYANEOAir speed still not enough for ambilight * Ayn Loki LED Control do update request after updating RGB values * Ayn LED Rework EC and LED control * AynLoki read and compare different value * Ayn EC cleanup * Ayn EC even more cleanup * Ayaneo prototype battery change LED update (does not compile) * AyaneoLED, fix power line and add debug logging. * Fix uninitialized previous power info. * prevPowerStatus null check and Thread.Sleep(1) * Ayaneo LED, remove unnecessary null check and add todo's. * Bias lighting vertical black bar detection settings and GUI work * Biaslighting functional vertical black bar detection, needs improvement. * Bias lighting update to use IsBlack function with color threshold. * start refactoring * more work * improve UI - todo: implement LEDSpeed - todo: implement LEDDirection * more work - support live accent color changes - migrate Dynamic Lighting timer to said class * add missing LEDSettingsUseAccentColor setting * remove redundant code * more work (doesn't compile yet) * more work * implement SetLedStatus() * Fix * fix * fix * that's better.. right ? * a few qol fixes * fix SetLedStatus on AYANEO * more work * fix AYN * Revert "fix AYN" This reverts commit 5ece741c52a7b64f1e7426d285c1f13ad243188f. * Revert "more work" This reverts commit 75957f2d158f6b04af0307e9e8709a662ac3b646. * Revert "fix SetLedStatus on AYANEO" This reverts commit a88263ebf9f70921a2245d01aa566b6dde88d285. * Revert "a few qol fixes" This reverts commit 1072f1316345a24c419e4fdfea1b1382e4e1321e. * Revert "that's better.. right ?" This reverts commit 5ed82a60181639c9cda1808cd359b0052f5b16ed. * remove duplicated code from AYN * more work - remove AYANEOLED - rename AYANEO to AYANEODevice - implement IDevice PowerStatusChanged event * prevent crash with SharpDX Device on resolution changes --------- Co-authored-by: Lesueur Benjamin <[email protected]> Co-authored-by: MrCivsteR <[email protected]> * fix merge errors and remvoe unused imports/usings * improve gamepad navigation experience with tooltip display on sliders * Improve ROGAlly OEM buttons support (#54) * tentative * improve ROGAlly OEM buttons reading * improve DynamicLighting - implement LEDSpeed - improve HidDevice logic on ROGAlly - removed LED Direction until figured on ROGAlly - removed LEDLevel.Wave from ROGAlly until figured * set OSPowerMode on default PowerProfiles * restore net8 * build 0.19.0.1 * Hotfixes based on Patreons feedbacks (#55) * remove Ambilight logError * fix an issue with Power profile settings dialog not being visible * fix issues with a few settings values not being applied when toggled - fix TDPOverrideValues - fix GPUOverrideValue - fix CPUCoreCount * fix formatting issue * add power profile creation button on quick profiles page * give ability to delete power profile from quick menu * improve threading and speedup loading time - loading time reduced by 10 seconds on i7-1195G7 - we need to improve threading on this application * improve MotherboardInfo class - processorSearcher.Get() is slow (about 1 sec). Let's make sure we don't execute it more than once. * migrate a few more calls to MotherboardInfo * update iNKORE.UI.WPF.Modern * Revert "update iNKORE.UI.WPF.Modern" This reverts commit fcd1f20c2814c816ec768560c3a84870b3d7bf02. * Revert "Revert "update iNKORE.UI.WPF.Modern"" This reverts commit 0007c3313dda2f33eb44063c2ff1f1a8158ac9fb. * Revert "Revert "Revert "update iNKORE.UI.WPF.Modern""" This reverts commit bda0588b39a4d87f8788fec2163f40f0c77e8dfd. * prevent crash on null sensor value * move improve virtual detection to controller page * misc UI fix * build 0.19.0.2 * implement backup method to detect and resume stalled controllers * implement Gamepad Toggle action on RadioButton and CheckBox * further improve QT UI * fix PowerProfileSettingsDialog * Add support for Lenovo Legion Go (#56) * improve DeviceManager robustness now capable of dealing with more USB devices * update vigem and hidhide * add LegionGo device * prevent crash on empty/null PnpDevice children array * improve name detection (use DeviceDesc field) * use a difference text when power cycling USB vs. BTH XInput Controller * more work on Legion Go support - implement proper support for OEM buttons - implement proper support for back/side buttons - implement basic support for touchpad * implement support for Scroll button - using an updateLock to prevent loosing a few calls, not perfect * oups * add Enum.LegionController.ButtonFlags.B6, B7, B8 * fix an issue with OEM buttons * GPD Win 4, clean up code duplication and fix OEM icons. (#57) * GPD Win 4, clean up code duplication and fix OEM icons. * OneXPlayerMiniPro Partial glyph fix * a bit of work on platforms - start implementing actions on hints - rename variables * OneXFly Support (Basic) (#58) * Initial OneXFly support * Basic OneXFly support. * Improve compatibility (#59) * test * more work * more work * more work * more work on UI * improve PhysicalControllerInstanceIds logic * implement better EC value for OneXPlayer2/Pro Thanks to #813 * more work * oups * disable controller page grid while controller manager is at work * more work * more work * improve hidDevice stability * add support for RightPadClick on Legion Go * add a few glyphs to LegionController * implement device specific layouts - Legion GO * reduce default touchpad sensivity emulation on Legion Go * update uninstaller GUID for HidHide and Vigem * Merge additions from Mainline (#60) * aa3f123 * 344d432 * e4a4f78 * That's better * the smaller the delay, the better * Improve detection * prevent crash on ResumeDevices * Implement SapientiaUsb - Add support for LED control over Legion Go * prevent issues with Sapient and controller on LegionGo wakeup from hibernation * improve DynamicLightingManager robustness * try and improve controller manager robustness * fix IsReady on LegionGo * should be better * add a progress ring on controller page when busy * use Gamepad: {Slot} rather than DICE icon on IController * only bother if targeted controller is Xbox360 * misc qol * net8.0 (#61) also cleaning imports * add IController SetHaptic() * there might be capricious devices... * OneXFly LED and fan control (#62) * OneXFly Fan Control * OneXFly LED control, solid color and rainbow effect. * Rog Ally: Implement proper M1/M2 support (#63) * Update ROGAlly.cs * done * ROG Ally M1 M2 cleanup * UI Text update * prevent the device from hanging * misc * ROG Ally, use all 23 command packets for controller configuration. --------- Co-authored-by: CasperH2O <[email protected]> * add check on DeviceCapabilities.FanControl on Performance and QuickPerformance pages * tentative to implement simplified inputs manager for F13...F24 (#64) * Update InputsManager.cs (#65) * force gamepad target to view * prevent LegionGo strange controller behavior from messing with controller manager * improve controller logic * fixed LegionGo accelerometer axis * improve controller manager - fixed an issue when pulling device drivers * prevent hang on GetPnPUtilResult * force restore all Mouse/HIDClass devices when HC is closed on LegionGO (WIP) * 0.19.0.3 * feature - default layout option on profiles (#827) * add missing LayoutPage_SetAsDefault * oups * fix merge errors * bugfix - hotkey output erase (#826) * Controller manager (#68) * try and improve controller management * simplify PnPDetails * still weird things happening * more work, still somehow getting mixed results where two devices are on the same slot... * more work * fix broken check on XUsbDeviceRemoved * few tweaks * hacking * not sure I can improve past this point * is it really doing anything ? * might not cause any harm * Try now * could it be it !? * (re)implement ControllerManagement toggle * fix LegionGo LED control * force gamepadmode to XBOX on Legion Go when XInput controller lands * bugfix - Legion Go - QT spam fix (#66) * feature - OSD Frametime (#67) * improve controller manager logic * Improve LegionGo touchpad support - Short tap: left click - Long tap: right click - Double tap: double click & drag * implement proper LegionGo touchpad passthrough option * prevent Rog Ally HID device from getting slow after sleep/resume * add haptic feedback to LegionGo default profile on touchpad click/hold * make ambilight square size 10% of screen width * prevent crash when changing resolution and ambilight is runing * allow dynamic lighting speed slider to affect ambilight refresh rate * this can cause infinite loop * LegionGo: add all three default power profiles * Update libraries and (un)installer scripts (#71) * improve install/uninstall - Fix [UninstallRun] path to HidHideCLI - Disable keep Hidhide checkbox - Update all libs (HidHide, RTSS, HWiNFO) * update windowsdesktop-runtime lib * remove unused Dependency_AddDotNet80 from iss * Jump to 0.19.0.6 (beta6) * small fixes * Controller manager will have three attempts before giving up. * prevent ambilight from being started if it was off on screen res changes * improve controller manager and exception dialog * Feature: Motion Toggle (#842) (#73) * Adds feature to use the motion trigger as toggle * removed unintended changes * Update HandheldCompanion/Managers/MotionManager.cs --------- Co-authored-by: Sergio Perilla <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * use HashSet instead of Dictionary * improve IController userIndex display * display virtual controller userIndex on controller page * fix an issue preventing controllers from being displayed on HC start * don't try to create a virtual controller first if it's deliberately disconnected * Improve LegionGo behavior when controller are wireless (#75) * testing: disable powrcycle when legiongo controller is wireless * oups * add comments * bugfix - installer (#74) * Fixed an issue with the initialization order of managers that affected performance and quick performance pages. * fix an issue that causes the controller manager from stacking virtual controllers * this should help keeping track of latest virtual controller userindex * improve controller management - offer to retry rather than restart application - migrate from timer to while loop for proper time spacing * don't hook keyboard on devices where OEMChords doesn't contain any KeyCode * Prevent crash on null udpSock * #752 Fix restore of total CPU Core count after adjustment by profile (#76) * Add support for OLED SteamDeck (Galileo) (#77) * update ryzenadj to support Galileo * fix an issue preventing a power profile from being applied if fan mode is set to software * update non XInput controllers to new controller logic * add missing IsPowerCycling = true * change SteamControllerMute default value back to False * greatly simplify Long press IAction * prevent Guide button (Special) from being locked when QT is summoned * dirty fix for stalled DSUServer on client disconnect * PromptFont Update, OneXPlayer and Legion Go OEM icon update (#78) * update Nefarius.Drivers.HidHide * Start implementing IHint class - Hint_SteamNeptuneDesktop - Hint_RogAllyServiceCheck * add new hint: Hint_LegionGoDaemon * fix Hint_LegionGoDaemon * fix a crash when pulling ProductName from multiple threads * improve Hint_RogAllyServiceCheck logic * Add missing resources for new hints - Hint_LegionGoDaemon - Hint_RogAllyServiceCheck - Hint_SteamNeptuneDesktop * Add notifications (#79) * implement a new page "Notifications" * create Hint_SteamXboxDrivers * add a nothing to see control * raised Stalled event when HWiNFO 12H limit is reached now we need to implement a new hint and add it to notifications page * implement CpuClock * halt hint(s) on notifications page close * Profile page, update warning icon to new standard. (#83) * #773 Fix HC always defaulting RTSS framerate limit to 0. (#81) * Fix Notification bell incorrectly showing new message on application (#82) * HWiNFO Add hint 12 hour limit check needs to be set by user. (#84) * HWiNFO Add hint 12 hour limit check needs to be set by user. * implement proper HWiNFO settings watcher and resources text --------- Co-authored-by: Lesueur Benjamin <[email protected]> * fix an issue while reading Hint_SteamNeptuneDesktop * Per-Profile and hotkey emulated controller switching (#80) * added the option to switch emaulted controller type using hotkey or per profile * fixed wait for lock release before changing profile HIDmode * changed profile HIDmode to enum values * fixed ControllerPage HIDmode selection after adding HIDmode.NotSelected * added warning in controller page when emulted controller is managed by profile * switched from using VirtualController.HIDchanged to VirtualController.ControllerSelected events --------- Co-authored-by: Lesueur Benjamin <[email protected]> * change ColumnDefinitions on ProfilesPage for emulated controller * update dependencies * add support for Steam Deck OLED firmware 0x1030 * fix an issue preventing Hide/Unhide button from being updated * might prevent random UI issues with target controller userindex display * always pass RightPadTouch value on LegionGo - we need to improve the logic from InputsManager here due to our exotic touchpad support on this device. * fix infinite error loop on DSUServer when client has disconnected (still dirty) * build 0.19.1.0 * modify both installer and HC so that installation is for current user… (#85) * modify both installer and HC so that installation is for current user only * update task triggers: At Log on of (current user) * This reduces the size of the installer by 10% * make vigem and hidhide silent * prevent infinite rumble on AOKZOE or ONE-NETBOOK devices * make VirtualManager Resume/Suspend optional (#86) * fix an issue preventing hotkeys to capture keyboard on devices with no key chords * Improve Lenovo Legion Go support (#87) * Trying to implement proper fan control * Implement proper SmartFanMode support * Improve Steam Deck controller (Neptune) support (#88) * test * don't open NeptuneController while powercycling * Revert "make VirtualManager Resume/Suspend optional (#86)" This reverts commit d56ea31. * fix wrong (...) glyph on SteamDeck * fix Rog Ally M1/M2 support fuck me * fix a crash on screen rotation - manage screen orientation to swap reported width/height - add a null check (shouldn't be needed) * implement new hint: Core Isolation check * oups * fix crash on null keys * prevent crash on controller manager when looking for plugged XInput controllers * quick cleanup * should fix the controller management "try again" button * LegionGO crash fix on init * prevent crash on failed ManagementScope call * prevent device manager from hanging UI * (Legion Go) prevent crash on null dataThread * (Legion Go) prevent crash on GetSmartFanMode * prevent crash when applying profile HIDmode while controller management thread is running (hopefully) * QoL edits on controller management * misc work on controller management * misc: make controller manager and device manager a bit more robust * stop mapping OEM1 to Xbox GUIDE * fix GetResolution() and therefore QT resolutions combobox and ambilight - Looks like we can't rely on SystemInformation.ScreenOrientation nor devMode.dmDisplayOrientation. Implemented a terrible hotfix... * build 0.19.1.2 * prevent crash on multithreaded access to MotherboardInfo.Manufacturer * fix name on few Joyshock controllers * prevent crash if JslConnectDevices() fails and try 3 more times * silence TDP changes when using immediate commands (AutoTDP mostly) * build 0.19.1.3 * Ayaneo 2021 device cleanup. (#90) * Fixed HID mode not changing when a profile is dismissed (#91) * fixed HID mode not changing when a profile is dismissed * store defaultHIDmode when HIDmode settings changes --------- Co-authored-by: Lesueur Benjamin <[email protected]> * bugfix - rtss + hwinfo overlay issues fixes (#92) * Initial CNCDan NUC Deck support. (#89) Device detection, TDP, GPU and CPU control. * Build 0.19.1.4 * fixme * Update README.md --------- Co-authored-by: CasperH2O <[email protected]> Co-authored-by: oolong tea <[email protected]> Co-authored-by: Miguel Ledesma <[email protected]> Co-authored-by: Bagboii <[email protected]> Co-authored-by: Bagboi <[email protected]> Co-authored-by: Andrew <[email protected]> Co-authored-by: Michael Dahl <[email protected]> Co-authored-by: CasperH2O <[email protected]> Co-authored-by: MrCivsteR <[email protected]> Co-authored-by: Matthias Seys <[email protected]> Co-authored-by: Sergio Perilla <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: cerahmed <[email protected]>
Summary by CodeRabbit
New Features
Localization
User Interface
Bug Fixes