Skip to content
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

EA to public #936

Merged
merged 451 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
451 commits
Select commit Hold shift + click to select a range
aa0197e
Functional Bias Lighting. (#51)
CasperH2O Oct 31, 2023
dd97e0b
fix merge errors and remvoe unused imports/usings
Valkirie Oct 31, 2023
9a3e78e
improve gamepad navigation experience with tooltip display on sliders
Valkirie Oct 31, 2023
2ef7c44
Improve ROGAlly OEM buttons support (#54)
Valkirie Nov 1, 2023
affc341
improve DynamicLighting
Valkirie Nov 1, 2023
be1fc60
set OSPowerMode on default PowerProfiles
Valkirie Nov 1, 2023
006929d
restore net8
Valkirie Nov 1, 2023
d914815
build 0.19.0.1
Valkirie Nov 3, 2023
a83d2b5
Hotfixes based on Patreons feedbacks (#55)
Valkirie Nov 5, 2023
fc8d1b1
implement backup method to detect and resume stalled controllers
Valkirie Nov 5, 2023
0f1c6c1
implement Gamepad Toggle action on RadioButton and CheckBox
Valkirie Nov 5, 2023
9482989
further improve QT UI
Valkirie Nov 5, 2023
a22777f
fix PowerProfileSettingsDialog
Valkirie Nov 5, 2023
f7b67b3
Add support for Lenovo Legion Go (#56)
Valkirie Nov 9, 2023
3f2a8bc
GPD Win 4, clean up code duplication and fix OEM icons. (#57)
CasperH2O Nov 10, 2023
dd8b1ae
a bit of work on platforms
Valkirie Nov 10, 2023
24d0bea
OneXFly Support (Basic) (#58)
CasperH2O Nov 13, 2023
2b8a2ad
Improve compatibility (#59)
Valkirie Nov 13, 2023
99c12a2
update uninstaller GUID for HidHide and Vigem
Valkirie Nov 13, 2023
dbffbf6
Merge additions from Mainline (#60)
Valkirie Nov 13, 2023
748bf95
That's better
Valkirie Nov 13, 2023
1bf297f
the smaller the delay, the better
Valkirie Nov 13, 2023
28b67f0
Improve detection
Valkirie Nov 13, 2023
c856e97
prevent crash on ResumeDevices
Valkirie Nov 15, 2023
1a4c0bd
Implement SapientiaUsb
Valkirie Nov 15, 2023
8906160
prevent issues with Sapient and controller on LegionGo wakeup from hi…
Valkirie Nov 15, 2023
333fae2
improve DynamicLightingManager robustness
Valkirie Nov 15, 2023
fbd4e27
try and improve controller manager robustness
Valkirie Nov 15, 2023
db3cad9
fix IsReady on LegionGo
Valkirie Nov 15, 2023
883fc9d
should be better
Valkirie Nov 15, 2023
21e8212
add a progress ring on controller page when busy
Valkirie Nov 15, 2023
ae63dea
use Gamepad: {Slot} rather than DICE icon on IController
Valkirie Nov 15, 2023
fac5ba5
only bother if targeted controller is Xbox360
Valkirie Nov 16, 2023
d71f034
misc qol
Valkirie Nov 16, 2023
65b1323
net8.0 (#61)
Valkirie Nov 16, 2023
8f0715c
add IController SetHaptic()
Valkirie Nov 16, 2023
fc47dc2
there might be capricious devices...
Valkirie Nov 16, 2023
158fe46
OneXFly LED and fan control (#62)
CasperH2O Nov 16, 2023
791adf3
Rog Ally: Implement proper M1/M2 support (#63)
Valkirie Nov 16, 2023
2db9e9f
add check on DeviceCapabilities.FanControl on Performance and QuickPe…
Valkirie Nov 16, 2023
2210833
tentative to implement simplified inputs manager for F13...F24 (#64)
Valkirie Nov 16, 2023
afb90fa
Update InputsManager.cs (#65)
Valkirie Nov 16, 2023
0378132
force gamepad target to view
Valkirie Nov 16, 2023
297d604
prevent LegionGo strange controller behavior from messing with contro…
Valkirie Nov 17, 2023
b166af5
improve controller logic
Valkirie Nov 17, 2023
00f34ab
fixed LegionGo accelerometer axis
Valkirie Nov 17, 2023
1b9da0c
improve controller manager
Valkirie Nov 17, 2023
4610b77
prevent hang on GetPnPUtilResult
Valkirie Nov 17, 2023
6962353
force restore all Mouse/HIDClass devices when HC is closed on LegionG…
Valkirie Nov 17, 2023
ca0fdb9
0.19.0.3
Valkirie Nov 17, 2023
390d23b
feature - default layout option on profiles (#827)
MSeys Nov 17, 2023
8aaaba2
add missing LayoutPage_SetAsDefault
Valkirie Nov 17, 2023
b3cc564
oups
Valkirie Nov 17, 2023
28727f2
fix merge errors
Valkirie Nov 17, 2023
032890f
bugfix - hotkey output erase (#826)
MSeys Nov 17, 2023
e272b45
Controller manager (#68)
Valkirie Nov 20, 2023
80d7337
bugfix - Legion Go - QT spam fix (#66)
MSeys Nov 20, 2023
96c30ed
feature - OSD Frametime (#67)
MSeys Nov 20, 2023
7a53d93
improve controller manager logic
Valkirie Nov 21, 2023
9de699c
Improve LegionGo touchpad support
Valkirie Nov 21, 2023
3dad37e
implement proper LegionGo touchpad passthrough option
Valkirie Nov 21, 2023
367b907
prevent Rog Ally HID device from getting slow after sleep/resume
Valkirie Nov 21, 2023
9832cda
add haptic feedback to LegionGo default profile on touchpad click/hold
Valkirie Nov 21, 2023
4da296a
make ambilight square size 10% of screen width
Valkirie Nov 21, 2023
c053230
prevent crash when changing resolution and ambilight is runing
Valkirie Nov 22, 2023
e998f93
allow dynamic lighting speed slider to affect ambilight refresh rate
Valkirie Nov 22, 2023
547b1f0
this can cause infinite loop
Valkirie Nov 22, 2023
1187ca5
LegionGo: add all three default power profiles
Valkirie Nov 22, 2023
ba1e2c1
Update libraries and (un)installer scripts (#71)
Valkirie Nov 22, 2023
b7ba76b
Controller manager will have three attempts before giving up.
Valkirie Nov 22, 2023
c194029
prevent ambilight from being started if it was off on screen res changes
Valkirie Nov 23, 2023
28f212f
improve controller manager and exception dialog
Valkirie Nov 23, 2023
8d1ec42
Feature: Motion Toggle (#842) (#73)
Valkirie Nov 23, 2023
2b13caa
use HashSet instead of Dictionary
Valkirie Nov 23, 2023
a7aeb6d
improve IController userIndex display
Valkirie Nov 23, 2023
9999946
display virtual controller userIndex on controller page
Valkirie Nov 23, 2023
b0395d1
fix an issue preventing controllers from being displayed on HC start
Valkirie Nov 23, 2023
276067c
don't try to create a virtual controller first if it's deliberately d…
Valkirie Nov 23, 2023
f7c0971
Improve LegionGo behavior when controller are wireless (#75)
Valkirie Nov 24, 2023
0992962
bugfix - installer (#74)
MSeys Nov 24, 2023
73819df
Fixed an issue with the initialization order of managers that affecte…
Valkirie Nov 24, 2023
3ce5095
Merge branch 'main' of https://github.com/Valkirie/HandheldCompanion-EA
Valkirie Nov 24, 2023
1ec0ef2
fix an issue that causes the controller manager from stacking virtual…
Valkirie Nov 24, 2023
1d1df02
this should help keeping track of latest virtual controller userindex
Valkirie Nov 24, 2023
45357f0
improve controller management
Valkirie Nov 24, 2023
5aae475
don't hook keyboard on devices where OEMChords doesn't contain any Ke…
Valkirie Nov 25, 2023
be1a7f5
Prevent crash on null udpSock
Valkirie Nov 25, 2023
3633cbe
#752 Fix restore of total CPU Core count after adjustment by profile …
CasperH2O Nov 25, 2023
bf1948f
Add support for OLED SteamDeck (Galileo) (#77)
Valkirie Nov 25, 2023
97d2b3d
update ryzenadj to support Galileo
Valkirie Nov 25, 2023
7b2c560
fix an issue preventing a power profile from being applied if fan mod…
Valkirie Nov 25, 2023
583a0b2
update non XInput controllers to new controller logic
Valkirie Nov 25, 2023
9da6acd
add missing IsPowerCycling = true
Valkirie Nov 25, 2023
fdb16e8
change SteamControllerMute default value back to False
Valkirie Nov 27, 2023
92d0c1f
greatly simplify Long press IAction
Valkirie Nov 27, 2023
3f03903
prevent Guide button (Special) from being locked when QT is summoned
Valkirie Nov 27, 2023
3cf652f
dirty fix for stalled DSUServer on client disconnect
Valkirie Nov 27, 2023
c34901e
PromptFont Update, OneXPlayer and Legion Go OEM icon update (#78)
CasperH2O Nov 27, 2023
29e3194
update Nefarius.Drivers.HidHide
Valkirie Nov 27, 2023
b20c47f
Start implementing IHint class
Valkirie Nov 27, 2023
a787fd9
Merge branch 'main' of https://github.com/Valkirie/HandheldCompanion-EA
Valkirie Nov 27, 2023
016d761
add new hint: Hint_LegionGoDaemon
Valkirie Nov 27, 2023
4233299
fix Hint_LegionGoDaemon
Valkirie Nov 27, 2023
55f9994
fix a crash when pulling ProductName from multiple threads
Valkirie Nov 27, 2023
53f7f50
improve Hint_RogAllyServiceCheck logic
Valkirie Nov 27, 2023
70989e0
Add missing resources for new hints
Valkirie Nov 28, 2023
20f7003
Add notifications (#79)
Valkirie Nov 28, 2023
c4674a6
raised Stalled event when HWiNFO 12H limit is reached
Valkirie Nov 28, 2023
fbb689c
implement CpuClock
Valkirie Nov 28, 2023
5a22610
halt hint(s) on notifications page close
Valkirie Nov 28, 2023
4c66091
Profile page, update warning icon to new standard. (#83)
CasperH2O Dec 1, 2023
06b1a28
#773 Fix HC always defaulting RTSS framerate limit to 0. (#81)
CasperH2O Dec 1, 2023
0265746
Fix Notification bell incorrectly showing new message on application …
CasperH2O Dec 1, 2023
2e33ca2
HWiNFO Add hint 12 hour limit check needs to be set by user. (#84)
CasperH2O Dec 3, 2023
3c2bc76
fix an issue while reading Hint_SteamNeptuneDesktop
Valkirie Dec 3, 2023
7c8e61a
Per-Profile and hotkey emulated controller switching (#80)
cerahmed Dec 3, 2023
107ae23
change ColumnDefinitions on ProfilesPage for emulated controller
Valkirie Dec 3, 2023
7e0e242
update dependencies
Valkirie Dec 3, 2023
36f9f2e
add support for Steam Deck OLED firmware 0x1030
Valkirie Dec 3, 2023
6ebc020
fix an issue preventing Hide/Unhide button from being updated
Valkirie Dec 3, 2023
63828c8
might prevent random UI issues with target controller userindex display
Valkirie Dec 3, 2023
71c2bdf
always pass RightPadTouch value on LegionGo
Valkirie Dec 3, 2023
83063d2
Merge branch 'main' of https://github.com/Valkirie/HandheldCompanion-EA
Valkirie Dec 3, 2023
24405c1
fix infinite error loop on DSUServer when client has disconnected (st…
Valkirie Dec 3, 2023
c2d6f54
build 0.19.1.0
Valkirie Dec 3, 2023
b145128
modify both installer and HC so that installation is for current user…
Valkirie Dec 4, 2023
18d11b4
prevent infinite rumble on AOKZOE or ONE-NETBOOK devices
Valkirie Dec 4, 2023
d56ea31
make VirtualManager Resume/Suspend optional (#86)
Valkirie Dec 4, 2023
7e5a06b
fix an issue preventing hotkeys to capture keyboard on devices with n…
Valkirie Dec 5, 2023
48afed1
Improve Lenovo Legion Go support (#87)
Valkirie Dec 6, 2023
be13898
Improve Steam Deck controller (Neptune) support (#88)
Valkirie Dec 6, 2023
0e8ecdf
Revert "make VirtualManager Resume/Suspend optional (#86)"
Valkirie Dec 6, 2023
7026119
fix wrong (...) glyph on SteamDeck
Valkirie Dec 6, 2023
24057dd
fix Rog Ally M1/M2 support
Valkirie Dec 6, 2023
96666de
Merge branch 'main' of https://github.com/Valkirie/HandheldCompanion-EA
Valkirie Dec 6, 2023
64c9a75
fix a crash on screen rotation
Valkirie Dec 6, 2023
11576cf
implement new hint: Core Isolation check
Valkirie Dec 6, 2023
fbea610
oups
Valkirie Dec 6, 2023
21ae703
fix crash on null keys
Valkirie Dec 6, 2023
7d18a82
prevent crash on controller manager when looking for plugged XInput c…
Valkirie Dec 6, 2023
1cdfcc6
quick cleanup
Valkirie Dec 6, 2023
0edd38c
should fix the controller management "try again" button
Valkirie Dec 7, 2023
e23830f
LegionGO crash fix on init
Valkirie Dec 7, 2023
163ee27
prevent crash on failed ManagementScope call
Valkirie Dec 7, 2023
43789e3
prevent device manager from hanging UI
Valkirie Dec 7, 2023
3a13d16
(Legion Go) prevent crash on null dataThread
Valkirie Dec 7, 2023
e276ae4
(Legion Go) prevent crash on GetSmartFanMode
Valkirie Dec 7, 2023
e1a9b1a
prevent crash when applying profile HIDmode while controller manageme…
Valkirie Dec 7, 2023
1a8811c
QoL edits on controller management
Valkirie Dec 7, 2023
684d49c
misc work on controller management
Valkirie Dec 7, 2023
b6571b3
Merge branch 'main' of https://github.com/Valkirie/HandheldCompanion-EA
Valkirie Dec 7, 2023
9bfa140
misc: make controller manager and device manager a bit more robust
Valkirie Dec 7, 2023
2fc0c6c
stop mapping OEM1 to Xbox GUIDE
Valkirie Dec 7, 2023
2bcfb34
fix GetResolution() and therefore QT resolutions combobox and ambilight
Valkirie Dec 7, 2023
4e7f4e8
build 0.19.1.2
Valkirie Dec 7, 2023
c40e205
prevent crash on multithreaded access to MotherboardInfo.Manufacturer
Valkirie Dec 7, 2023
db9f942
fix name on few Joyshock controllers
Valkirie Dec 8, 2023
e040f06
prevent crash if JslConnectDevices() fails and try 3 more times
Valkirie Dec 8, 2023
716e577
silence TDP changes when using immediate commands (AutoTDP mostly)
Valkirie Dec 8, 2023
cf0dae2
build 0.19.1.3
Valkirie Dec 8, 2023
5e5d5d9
Ayaneo 2021 device cleanup. (#90)
CasperH2O Dec 9, 2023
b88c03b
Fixed HID mode not changing when a profile is dismissed (#91)
cerahmed Dec 9, 2023
9fc7ab2
bugfix - rtss + hwinfo overlay issues fixes (#92)
MSeys Dec 9, 2023
71e4cdb
Initial CNCDan NUC Deck support. (#89)
CasperH2O Dec 10, 2023
13793a8
Build 0.19.1.4
CasperH2O Dec 10, 2023
51397c6
use targetLock to avoid both SetTarget and ClearTarget from having ba…
Valkirie Dec 10, 2023
2962bf5
tentative fix on JSL/DInput (#94)
Valkirie Dec 11, 2023
f10e337
Improve controller manager
Valkirie Dec 11, 2023
7c41341
Migrate a few managers to static and improve threading (#96)
Valkirie Dec 13, 2023
edaaaa8
fixed an issue causing a crash when trying to pull current HC task fr…
Valkirie Dec 13, 2023
68e382a
fixed a typo with DPad Right, spelled PPad Right
Valkirie Dec 13, 2023
22e56a6
Added full fan speed toggle (#875)
m33ts4k0z Dec 13, 2023
4e43207
enable TDP manipulations on LegionGo default power profiles
Valkirie Dec 13, 2023
54b3257
fix an issue caused by missplaced events listener
Valkirie Dec 14, 2023
e651dd0
Add support for Steam Deck OLED BIOS 107 (#98)
Valkirie Dec 15, 2023
d717866
Improve ADLX support and implement Integer Scaling support (#99)
Valkirie Dec 15, 2023
e433315
update libryzenadj
Valkirie Dec 15, 2023
97781be
fixing RSRState conversion to boolean
Valkirie Dec 15, 2023
21d4f6e
fixed layout page not showing actual emulated controller layout if ap…
cerahmed Dec 17, 2023
c925a36
feature - better device profiles (#101)
MSeys Dec 17, 2023
75874ac
Feature multiprofiles (#95)
cerahmed Dec 17, 2023
37ddecf
Fix manual TDP being set too frequent
CasperH2O Dec 14, 2023
7eecd03
Cleanup HWiNFO Platform
CasperH2O Dec 14, 2023
cd291fc
hotfix for new Legion Space update v1.0.2.5: Controller READY-byte an…
cerahmed Dec 18, 2023
43f54c1
Update HandheldCompanion/Controllers/LegionController.cs
Valkirie Dec 18, 2023
4036aa3
Update HandheldCompanion/Controllers/LegionController.cs
Valkirie Dec 18, 2023
f309fc4
Cleanup Coderabbit thick finger incident.
CasperH2O Dec 19, 2023
cd03b54
Release 0.19.1.8
CasperH2O Dec 19, 2023
53e283c
remove set_min_gfxclk_freq and set_max_gfxclk_freq
Valkirie Dec 22, 2023
a2b0d12
don't set isCurrent on UpdateSource.Creation
Valkirie Dec 22, 2023
3867013
move slow, process-related, functions out of UI thread
Valkirie Dec 23, 2023
078f0e6
Improve Legion Go controller data thread (#105)
Valkirie Dec 23, 2023
dfbaae6
Ayaneo KUN (#103)
CasperH2O Dec 23, 2023
23e9a5e
Update FanProfile a bit (#107)
Valkirie Dec 23, 2023
cd5be2c
Graphics settings update (#106)
MSeys Dec 23, 2023
c7235f8
Improve Framerate limiter selection (#108)
Valkirie Dec 24, 2023
484b177
Fix RSR & RIS (#109)
MSeys Dec 24, 2023
513ef9c
Fix Legion Go LegionSpace Hint (#110)
MSeys Dec 24, 2023
7c32308
build 0.20.0.0
Valkirie Dec 24, 2023
86348ec
LED, only show available options + additional Legion Go LED support (…
CasperH2O Dec 24, 2023
d7fde5d
Fix settings being reused after update. (#111)
CasperH2O Dec 24, 2023
32a0cbb
Build 0.20.2.5
CasperH2O Dec 24, 2023
dae32db
fixed QuickProfilesPage profile toggle not applying profile (#116)
cerahmed Dec 26, 2023
99b6453
Improve AutoTDP FPS range to support 144 Hz. (#117)
CasperH2O Dec 28, 2023
e2f309d
Ayaneo KUN LED and RC LC Swap fix (#118)
CasperH2O Dec 28, 2023
d36f715
update iNKORE.UI.WPF.Modern (#121)
Valkirie Dec 28, 2023
b201dcd
FPS Limiter fix (#113)
MSeys Dec 28, 2023
3fab4b1
Improve Performance Profiles by renaming them to Presets (#120)
CasperH2O Dec 28, 2023
0bd820d
allow gamepad key to be held down and still affect UI elements (#124)
Valkirie Dec 28, 2023
cc7d0e9
ADLX Wrapper - lock + timeout (#115)
MSeys Dec 28, 2023
bfbb98d
improve legion go controller support (#125)
Valkirie Dec 28, 2023
4296b6c
Make default color black to prevent flashign whtie (#122)
0SkillAllLuck Dec 28, 2023
c20b93b
force unplug and null controller(s) when unplugged (#126)
Valkirie Dec 29, 2023
f71af9f
fix crash on null controller
Valkirie Dec 29, 2023
bc35645
#773 Fix HC always defaulting RTSS framerate limit to 0 (again). (#127)
CasperH2O Dec 29, 2023
fb8adf9
Add KUN to README (#129)
0SkillAllLuck Dec 30, 2023
469069a
added quick overlay page to gamepad focus manager (#131)
cerahmed Dec 30, 2023
5fac125
Improved ADLX implementation + Integer scaling (#133)
Valkirie Jan 1, 2024
d471ed7
restore RenderMode.Default (#134)
Valkirie Jan 1, 2024
bacb2b3
simplify QuickToolsWindowLocation (left, right)
Valkirie Jan 1, 2024
ac6f73a
UpdateLocation should use Application.Current.Dispatcher.BeginInvoke
Valkirie Jan 1, 2024
fb5fa02
implement writeLock (#135)
Valkirie Jan 1, 2024
148e3e2
Hide Brightness slider if device is incapable
0SkillAllLuck Dec 28, 2023
2d5cc40
Implement proper WM_PAINT loop fix (#138)
Valkirie Jan 2, 2024
6e1fe34
misc fixes to QT
Valkirie Jan 2, 2024
80b97d9
Implement PressType.Hold (#139)
Valkirie Jan 2, 2024
4fb34c0
improve tooltip display logic
Valkirie Jan 2, 2024
143421c
improve IActions
Valkirie Jan 2, 2024
379bf13
restore RenderMode.SoftwareOnly
Valkirie Jan 2, 2024
40ba9e4
remove useless Grid from OverlayQuickTools
Valkirie Jan 2, 2024
febc92b
Graphics setting localization. (#140)
CasperH2O Jan 2, 2024
890a4b8
misc crashfixes
Valkirie Jan 2, 2024
36d3db8
Build 0.20.2.7
CasperH2O Jan 2, 2024
3bd9fbc
Implement NightLight toggle on QuickDevice page (#141)
Valkirie Jan 3, 2024
8ba8798
implemented toggle OSD hotkey (#137)
cerahmed Jan 3, 2024
342786b
Restore proper TDP increase/decrease hotkeys support (#144)
Valkirie Jan 5, 2024
4619aac
Fix quicktools left and right margin (#146)
Valkirie Jan 5, 2024
7f8659f
Implement new profile section: compatibility settings (#145)
Valkirie Jan 5, 2024
f65a85b
add missing DeviceCapabilities.DynamicLighting check on QuickDevicePage
Valkirie Jan 5, 2024
601c730
Fix volume and brightness slider (#147)
CasperH2O Jan 5, 2024
953d44e
misc
Valkirie Jan 5, 2024
d856db8
Merge branch 'main' of https://github.com/Valkirie/HandheldCompanion-EA
Valkirie Jan 5, 2024
f3ab7e8
Fix DSU Server SocketAsyncEventArgs due to .NET8 update (#149)
CasperH2O Jan 5, 2024
5075bb6
Fixed Ayaneo RGB reset on connect and disconnect of power (#929)
indiesaudi Jan 5, 2024
6b5c17f
Implementing ActionState (#150)
Valkirie Jan 7, 2024
7364b49
Additional Res Scale warning (#151)
MSeys Jan 7, 2024
928e38f
Remove HWInfo (#152)
0SkillAllLuck Jan 8, 2024
5fce276
About page, contributors list update.
CasperH2O Jan 12, 2024
ce45fef
Build 0.20.3.0
CasperH2O Jan 12, 2024
5ebcf59
Merge branch 'main' into pr/936
CasperH2O Jan 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,180 changes: 583 additions & 597 deletions HandheldCompanion.iss

Large diffs are not rendered by default.

Binary file added HandheldCompanion/ADLX_3DSettings.dll
Binary file not shown.
Binary file added HandheldCompanion/ADLX_DisplaySettings.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion HandheldCompanion/Actions/AxisActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class AxisActions : GyroActions

public AxisActions()
{
this.ActionType = ActionType.Joystick;
this.actionType = ActionType.Joystick;
this.Value = new Vector2();
}

Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/Actions/ButtonActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ButtonActions : IActions

public ButtonActions()
{
this.ActionType = ActionType.Button;
this.actionType = ActionType.Button;

this.Value = false;
this.prevValue = false;
Expand Down
217 changes: 208 additions & 9 deletions HandheldCompanion/Actions/IActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ public enum ActionType
Special = 6,
}

[Serializable]
public enum ActionState
{
Stopped = 0,
Running = 1,
Aborted = 2,
Succeed = 3,
Suspended = 4,
Forced = 5,
}

[Serializable]
public enum ModifierSet
{
Expand All @@ -36,7 +47,9 @@ public enum ModifierSet
public enum PressType
{
Short = 0,
Long = 1,
Long = 1, // hold for x ms and get an action
Hold = 2, // press and hold the command for x ms
Double = 3,
}

[Serializable]
Expand Down Expand Up @@ -71,15 +84,17 @@ public abstract class IActions : ICloneable
{ ModifierSet.ShiftControlAlt, new KeyCode[] { KeyCode.LShift, KeyCode.LControl, KeyCode.LMenu } },
};

public ActionType ActionType = ActionType.Disabled;
public ActionType actionType = ActionType.Disabled;
public PressType pressType = PressType.Short;
public ActionState actionState = ActionState.Stopped;

protected object Value;
protected object prevValue;

// TODO: multiple delay, delay ranges
public PressType PressType = PressType.Short;
public int LongPressTime = 450; // default value for steam
protected int pressTimer = -1; // -1 inactive, >= 0 active
public int ActionTimer = 200; // default value for steam
public int pressTimer = -1; // -1 inactive, >= 0 active

private int pressCount = 0; // used to store previous press value for double tap

public bool Turbo;
public int TurboDelay = 30;
Expand All @@ -89,6 +104,8 @@ public abstract class IActions : ICloneable
public bool Toggle;
protected bool IsToggled;

public bool Interruptable = true;

public HapticMode HapticMode = HapticMode.Off;
public HapticStrength HapticStrength = HapticStrength.Low;

Expand All @@ -110,21 +127,203 @@ public virtual void SetHaptic(ButtonFlags button, bool up)

public virtual void Execute(ButtonFlags button, bool value)
{
switch(PressType)
if (actionState == ActionState.Suspended)
{
// bypass output
this.Value = false;
this.prevValue = value;
return;
}
else if (actionState == ActionState.Forced)
{
// bypass output
value = true;
}

switch (pressType)
{
case PressType.Long:
{
if (value || (pressTimer <= LongPressTime && pressTimer >= 0))
if (value)
{
// update state
actionState = ActionState.Running;

// update timer
pressTimer += TimerManager.GetPeriod();

if (pressTimer >= ActionTimer)
{
// update state
actionState = ActionState.Succeed;
}
else
{
// bypass output
this.Value = false;
this.prevValue = value;
return;
}
}
else
{
// key was released too early
if (actionState == ActionState.Running)
{
// update state
actionState = ActionState.Aborted;

// update timer
pressTimer = Math.Max(50, pressTimer);
}
else if (actionState == ActionState.Succeed)
{
// update state
actionState = ActionState.Stopped;

// update timer
pressTimer = -1;
}
else if (actionState == ActionState.Stopped)
{
// update timer
pressTimer = -1;
}

if (actionState == ActionState.Aborted)
{
// set to aborted for a time equal to the actions was "running"
if (pressTimer >= 0)
{
// update state
actionState = ActionState.Aborted;

// update timer
pressTimer -= TimerManager.GetPeriod();
}
else
{
// update state
actionState = ActionState.Stopped;

// update timer
pressTimer = -1;
}
}
}
}
break;

case PressType.Hold:
{
if (value || (pressTimer <= ActionTimer && pressTimer >= 0))
{
// update state
actionState = ActionState.Running;

// update timer
pressTimer += TimerManager.GetPeriod();

// bypass output (simple)
value = true;
}
else if(pressTimer >= LongPressTime)
else if (pressTimer >= ActionTimer)
{
// update state
actionState = ActionState.Stopped;

// reset var(s)
pressTimer = -1;
}
}
break;

case PressType.Double:
{
if (value)
{
// increase press count
if ((bool)prevValue != value)
pressCount++;
}

switch (pressCount)
{
default:
{
if (actionState != ActionState.Stopped)
{
// update timer
pressTimer += TimerManager.GetPeriod();

if (pressTimer >= 50)
{
// update state
actionState = ActionState.Stopped;

// reset var(s)
pressCount = 0;
pressTimer = 0;
}
}

// bypass output
this.Value = false;
this.prevValue = value;
return;
}

case 1:
{
// update state
actionState = ActionState.Running;

// update timer
pressTimer += TimerManager.GetPeriod();

// too slow to press again ?
if (pressTimer > ActionTimer)
{
// update state
actionState = ActionState.Aborted;

// reset var(s)
pressCount = 0;
pressTimer = 0;
}

// bypass output
this.Value = false;
this.prevValue = value;
return;
}

case 2:
{
// on time
if (pressTimer <= ActionTimer && value)
{
// update state
actionState = ActionState.Succeed;

// reset var(s)
pressCount = 2;
pressTimer = ActionTimer;
}
else
{
// update state
actionState = ActionState.Stopped;

// reset var(s)
pressCount = 0;
pressTimer = 0;
}
}
break;
}
}
break;
}

if (Toggle)
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/Actions/KeyboardActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class KeyboardActions : IActions

public KeyboardActions()
{
this.ActionType = ActionType.Keyboard;
this.actionType = ActionType.Keyboard;

this.Value = false;
this.prevValue = false;
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/Actions/MouseActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class MouseActions : GyroActions

public MouseActions()
{
this.ActionType = ActionType.Mouse;
this.actionType = ActionType.Mouse;

this.Value = false;
this.prevValue = false;
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/Actions/SpecialActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class SpecialActions : IActions

public SpecialActions()
{
this.ActionType = ActionType.Special;
this.actionType = ActionType.Special;
}

public SpecialActions(SpecialActionsType type) : this()
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/Actions/TriggerActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class TriggerActions : IActions

public TriggerActions()
{
this.ActionType = ActionType.Trigger;
this.actionType = ActionType.Trigger;
this.Value = (short)0;
}

Expand Down
12 changes: 9 additions & 3 deletions HandheldCompanion/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@
<setting name="PlatformRTSSEnabled" serializeAs="String">
<value>True</value>
</setting>
<setting name="PlatformHWiNFOEnabled" serializeAs="String">
<value>True</value>
</setting>
<setting name="QuickToolsLocation" serializeAs="String">
<value>3</value>
</setting>
Expand Down Expand Up @@ -227,6 +224,9 @@
<setting name="LEDAmbilightVerticalBlackBarDetection" serializeAs="String">
<value>False</value>
</setting>
<setting name="LEDUseSecondColor" serializeAs="String">
<value>False</value>
</setting>
<setting name="LEDSettingsLevel" serializeAs="String">
<value>0</value>
</setting>
Expand All @@ -245,6 +245,12 @@
<setting name="LegionControllerPassthrough" serializeAs="String">
<value>False</value>
</setting>
<setting name="OnScreenDisplayToggle" serializeAs="String">
<value>False</value>
</setting>
<setting name="LastOnScreenDisplayLevel" serializeAs="String">
<value>2</value>
</setting>
</HandheldCompanion.Properties.Settings>
</userSettings>
</configuration>
4 changes: 4 additions & 0 deletions HandheldCompanion/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@

<math:MathConverter x:Key="Math" />

<Style BasedOn="{StaticResource {x:Static ui:ThemeKeys.ExpanderCardStyleKey}}" TargetType="Expander">
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Style>

</ResourceDictionary>
</Application.Resources>
</Application>
5 changes: 0 additions & 5 deletions HandheldCompanion/Controllers/DS4Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ public override void SetLightColor(byte R, byte G, byte B)
});
}

public override void Cleanup()
{
TimerManager.Tick -= UpdateInputs;
}

public override string GetGlyph(ButtonFlags button)
{
switch (button)
Expand Down
5 changes: 0 additions & 5 deletions HandheldCompanion/Controllers/DualSenseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ public override void SetLightColor(byte R, byte G, byte B)
});
}

public override void Cleanup()
{
TimerManager.Tick -= UpdateInputs;
}

public override string GetGlyph(ButtonFlags button)
{
switch (button)
Expand Down
Loading
Loading