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

Cumulative changes from my fork #4

Open
wants to merge 398 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
398 commits
Select commit Hold shift + click to select a range
f0c8957
Fix drums mapper being used instead of the fallback mapper
TheNathannator Jun 21, 2023
116549f
Ignore all unsupported interface GUIDs instead of using an exclusion …
TheNathannator Jun 21, 2023
7f7742a
Add gamepad mapper for debugging purposes
TheNathannator Jun 21, 2023
65299ad
Fix various vJoy mapping issues
TheNathannator Jun 22, 2023
f33dee9
Fix more than one device mapper being created on device connection
TheNathannator Jun 22, 2023
9fec5dc
Fix device limit detection
TheNathannator Jun 22, 2023
a708af9
Fix packet capture not stopping correctly on error
TheNathannator Jun 22, 2023
0d9bba8
Properly handle the client number in device packets
TheNathannator Jun 22, 2023
d75a79d
Further rework device limit detection and handling
TheNathannator Jun 22, 2023
9b04bee
Log packets *before* processing them
TheNathannator Jun 22, 2023
1de2823
Ignore certain command IDs
TheNathannator Jun 22, 2023
874aebc
Add XboxResult enum for better result handling/details
TheNathannator Jun 22, 2023
00565f9
Implement handling of device disconnections
TheNathannator Jun 22, 2023
f62f5d1
Remove handling of device arrival message
TheNathannator Jun 22, 2023
d691cdc
Remove no-longer-used ParsingHelpers class
TheNathannator Jun 22, 2023
92b9aae
Fix device-still-present check when starting capture
TheNathannator Jun 22, 2023
5d803c3
A bunch of general cleanup
TheNathannator Jun 24, 2023
3f33fc0
Move chunk index parsing to header parsing
TheNathannator Jun 25, 2023
8045f98
Fix package references using the wrong directory
TheNathannator Jun 25, 2023
0b55323
Re-add message for when Pcap isn't installed
TheNathannator Jun 25, 2023
04547be
Fix ViGEmBus mode not creating devices
TheNathannator Jun 25, 2023
3d2528c
Add message for device client connection
TheNathannator Jun 25, 2023
f4871b6
Bump version to v3.0
TheNathannator Jun 25, 2023
0916b4c
Update readme
TheNathannator Jun 25, 2023
599fd94
Re-order device GUID definitions
TheNathannator Jun 25, 2023
b397749
Fix receiver not being auto-selected on first startup
TheNathannator Jun 25, 2023
0519d7f
Disable vJoy version check
TheNathannator Jun 27, 2023
1d8a3d2
Update program screenshot
TheNathannator Jun 27, 2023
d5f866c
Remove device ID from XboxDevice and re-handle arrival message
TheNathannator Jun 28, 2023
e4945d8
Add span-based byte buffer ToString helper
TheNathannator Jun 28, 2023
a250fec
Add Nefarius.Drivers.WinUSB and Nefarius.Utilities.DeviceManagement p…
TheNathannator Jun 28, 2023
f471f8f
Implement basic WinUSB backend; not fully functional yet
TheNathannator Jun 28, 2023
c3e7138
Move USB read thread to device class
TheNathannator Jun 28, 2023
04383f5
Move LEB128 decoding to CommandHeader
TheNathannator Jun 28, 2023
c0519a8
Don't compare spans to null
TheNathannator Jun 28, 2023
58788f1
Store client ID as a byte instead of an int
TheNathannator Jun 28, 2023
1b179a1
Implement command header encoding
TheNathannator Jun 28, 2023
a72ca05
Store client ID and parent device in clients
TheNathannator Aug 21, 2023
b399bbb
Couple adjustments/notes to chunk handling
TheNathannator Aug 21, 2023
e23aed6
Create dedicated class for chunk buffers and handle them on a command…
TheNathannator Aug 21, 2023
37df6ca
Implement packet sending
TheNathannator Aug 22, 2023
83a9b57
Fix chunk index always being included in header byte length
TheNathannator Aug 22, 2023
cb0997b
Refactor command header client/flags retrieval
TheNathannator Aug 22, 2023
01337b1
Handle acknowledge flag
TheNathannator Aug 22, 2023
cc80547
Respect system command flag
TheNathannator Aug 22, 2023
356a173
Refactor handling of keystrokes
TheNathannator Aug 22, 2023
9db468e
Fix sequence ID handling
TheNathannator Aug 22, 2023
3e5743a
Client side of message sending
TheNathannator Aug 22, 2023
7993719
Add XboxMessage container for constant messages
TheNathannator Aug 22, 2023
b71bb7c
Retry a few times on failed packet sends
TheNathannator Aug 22, 2023
b4e9456
Reorganize/refactor packet definitions and add missing doc comments
TheNathannator Aug 22, 2023
66afaa4
Refactor command ID definitions
TheNathannator Aug 22, 2023
255bae5
Implement basic initialization sequence
TheNathannator Aug 22, 2023
cf4cbd5
Rework descriptor parsing to use hash sets
TheNathannator Aug 22, 2023
bdb6189
Respect descriptor's list of output commands
TheNathannator Aug 22, 2023
5906c52
Add Xbox prefix to all packet types to prevent name collisions
TheNathannator Aug 23, 2023
ef5442c
Hook up WinUSB backend to UI
TheNathannator Aug 23, 2023
36492fc
Fix USB device disconnection
TheNathannator Aug 23, 2023
8c0e870
Better read/write logging
TheNathannator Aug 23, 2023
b5a2d60
of course a single missing character breaks the whole thing lol
TheNathannator Aug 23, 2023
bff6d20
Adjust message error logging and log disconnect message
TheNathannator Aug 23, 2023
8b6074c
More proper client disconnection handling
TheNathannator Aug 23, 2023
c7b89d7
Use the correct endpoint when writing
TheNathannator Aug 23, 2023
0bce81a
Move constant message definitions to their respective types
TheNathannator Aug 23, 2023
e448045
Reset USB device when stopping capture and on app exit
TheNathannator Aug 23, 2023
3e45e42
Fix a couple issues with (dis)connecting devices after starting capture
TheNathannator Aug 23, 2023
4569c15
Fix Stop button disabling when disconnecting all USB devices
TheNathannator Aug 23, 2023
265f7a5
Greatly refactor device mapper architecture
TheNathannator Aug 23, 2023
7c4b775
Implement support for the wireless legacy adapter
TheNathannator Aug 23, 2023
eeeafeb
Fix a couple incorrect accessibility modifiers
TheNathannator Aug 23, 2023
c2a1093
Refactor backend settings
TheNathannator Aug 23, 2023
ac4ea0c
Fix double-reset/potential reset loop when stopping capture
TheNathannator Aug 23, 2023
03a9477
Refactor a bunch of logging stuff
TheNathannator Aug 23, 2023
791efc9
Always map the guide button on WinUSB devices
TheNathannator Aug 23, 2023
40988d6
Implement GHL guitar support
TheNathannator Aug 23, 2023
c9fd91b
Merge pull request #4 from TheNathannator/usb-backend
TheNathannator Aug 24, 2023
6555a7f
Upgrade installer to WiX v4
TheNathannator Aug 24, 2023
71307ec
Convert program project file to SDK style
TheNathannator Aug 25, 2023
59d303f
Update installer binaries dir and add missing file references
TheNathannator Aug 25, 2023
1cef73f
Move unhandled exception event handler to App
TheNathannator Aug 25, 2023
7cbf544
Bump version to 4.0.0.0
TheNathannator Aug 25, 2023
d36ec54
Remove setting for mapping the guide button
TheNathannator Aug 25, 2023
239f1d0
Remove x86 binaries and configurations
TheNathannator Aug 25, 2023
7c8f0f9
Also log verbose errors to the main log
TheNathannator Aug 25, 2023
7ccfa74
Redesign and refactor main window
TheNathannator Aug 25, 2023
94c773d
Fix/adjust a few logging things
TheNathannator Aug 25, 2023
527abef
Clean up textbox writer
TheNathannator Aug 25, 2023
0d669c4
Correct start button enable conditions
TheNathannator Aug 25, 2023
4925e38
Auto-scroll console when scrolled to the bottom
TheNathannator Aug 25, 2023
774bb8c
Refactor WinUSB backend a bit to fix some issues
TheNathannator Aug 25, 2023
36abe43
Indicate why Start button is disabled, and adjust layout a little more
TheNathannator Aug 26, 2023
4c350a3
Only show "receiver not detected" message on first refresh
TheNathannator Aug 26, 2023
59056f2
Other main window cleanups
TheNathannator Aug 26, 2023
b0e44f2
Change Pcap check to not require Pcap to be installed for USB-only us…
TheNathannator Aug 26, 2023
e617740
Don't bolden labels if they are disabled
TheNathannator Aug 26, 2023
d447922
Update readme
TheNathannator Aug 26, 2023
d59dad3
Allow same-version upgrades in installer
TheNathannator Aug 26, 2023
a26bf0a
Add info about what backend is being used for an XboxDevice
TheNathannator Aug 26, 2023
f2b2b5d
Don't handle devices that are known to be unsupported
TheNathannator Aug 26, 2023
f0772b7
Log a not-supported message when gamepads are connected over USB
TheNathannator Aug 26, 2023
a238b9c
Ignore gamepad interface when it conflicts with others
TheNathannator Aug 26, 2023
cf39c2c
Greatly simplify device mapper creation parameters
TheNathannator Aug 26, 2023
0f43038
Add backend code for swapping drivers to and from WinUSB
TheNathannator Aug 28, 2023
e878cbb
Implement CLI support for swapping drivers
TheNathannator Aug 28, 2023
1e00dd9
Add USB device configuration window
TheNathannator Aug 28, 2023
6b28f7a
Finish implementing driver switching
TheNathannator Aug 28, 2023
5682300
Make driver switching async and add progress bar indicator
TheNathannator Aug 29, 2023
9179587
Update readme some more
TheNathannator Sep 5, 2023
972f6df
Replace Jaguar firmware backup with CH wiki rehost
TheNathannator Sep 12, 2023
cbcbb1e
Fix invalid message errors with GHL guitars
TheNathannator Oct 6, 2023
b944374
Improve USB error handling and read aborts
TheNathannator Oct 6, 2023
ba9c7b7
Add basic device icons to device configuration menu
TheNathannator Oct 6, 2023
7b3f478
Fix full exception not being logged for mapper creation exceptions
TheNathannator Oct 25, 2023
ebce2e2
Add extra guards against invalid device type selection states
TheNathannator Oct 25, 2023
d120913
Log when ViGEmBus device limit is reached
TheNathannator Oct 25, 2023
28432ba
Fix somehow possible NRE when stopping WinUSB backend
TheNathannator Nov 23, 2023
dfa3ba2
Guard against exceptions in USB device list window
TheNathannator Nov 23, 2023
0d4e9f3
Add proper definition for when mapping mode is unset
TheNathannator Nov 23, 2023
e27e999
Allow enabling/disabling input mapping for devices
TheNathannator Nov 23, 2023
019ba4e
Rework how WinUSB devices are initialized and started/stopped
TheNathannator Nov 23, 2023
dae107d
Write main log to debug output
TheNathannator Nov 23, 2023
3ee5dd7
Fix WinUSB access denied error
TheNathannator Nov 23, 2023
43d4f1e
Fix device type not being set when WinUSB backend starts
TheNathannator Nov 23, 2023
9954eeb
Bump version to v4.0.1.0
TheNathannator Nov 23, 2023
276d20f
Update readme
TheNathannator Nov 23, 2023
dde81e5
Don't unnecessarily check size bounds when reading from buffers
TheNathannator Dec 14, 2023
34aa11c
Re-implement MemoryMarshal.TryRead without the references check
TheNathannator Dec 14, 2023
f742b09
Add doc comments to XboxResult values
TheNathannator Dec 14, 2023
d4fb7dc
Fix virtual device leak when disconnecting wireless controllers by re…
TheNathannator Dec 14, 2023
093be6b
Bump version to v4.0.2
TheNathannator Dec 14, 2023
79a44f5
New wireless legacy adapter observation
TheNathannator Dec 15, 2023
4bb8fd1
A couple comments
TheNathannator Dec 15, 2023
e0b60c3
Add packet log line parsing
TheNathannator Dec 15, 2023
a3ed58b
Implement basic packet log replay backend for debugging
TheNathannator Dec 15, 2023
1a89231
Bump version to v4.0.3
TheNathannator Dec 15, 2023
d15e2fc
Fix vJoy mode still using ViGEmBus mappers
TheNathannator Jan 21, 2024
2f8a00a
Bump to v4.0.4
TheNathannator Jan 21, 2024
38b0a79
Simplify mapper factory
TheNathannator Mar 18, 2024
95e0f11
Separate ViGEm drums d-pad handling into its own function
TheNathannator Mar 18, 2024
d2c3eba
Remove some unused using directives
TheNathannator Mar 18, 2024
fce1e22
Change byte-to-short scaling to be purely bitwise operations
TheNathannator Mar 18, 2024
c78476d
Add RPCS3 compatibility mode for ViGEmBus mappings
TheNathannator Mar 18, 2024
e921c21
Update packet log docs to match current packet log format
TheNathannator Mar 18, 2024
376f0fc
Fix small bug in hex character parsing
TheNathannator Mar 18, 2024
00203b4
Organize packet logs into a folder
TheNathannator Mar 18, 2024
caf6dec
Add reformatted GuitarSniffer packet logs to docs
TheNathannator Mar 18, 2024
7fd37cd
Fix vJoy mode in replay backend
TheNathannator Mar 20, 2024
b0afed8
Fix pickup switch in ViGEmBus/RPCS3 mode
TheNathannator Mar 20, 2024
6c3c069
Add debug handling for gamepads to fallback RPCS3 mapper
TheNathannator Mar 20, 2024
0a9ef86
Add comment support to replay backend
TheNathannator Mar 20, 2024
7cf7493
Add guitar/drums debugging packet logs
TheNathannator Mar 20, 2024
81f2d6e
Bump to v4.1.0
TheNathannator Mar 20, 2024
174660f
Fix a couple replay packet parsing issues
TheNathannator Mar 29, 2024
356ecc3
Add start button status label
TheNathannator Apr 21, 2024
e3e7c52
Don't default either backend to being enabled
TheNathannator Apr 21, 2024
4b3286a
Fix USB configure devices button not being disabled when starting
TheNathannator Apr 21, 2024
d4b3227
Clarify USB configure devices button
TheNathannator Apr 21, 2024
f9aafb6
Map drums/cymbals fully separately in ViGEm drums mapper
TheNathannator Apr 21, 2024
41e2154
Overhaul readme
TheNathannator Apr 21, 2024
4d5e39b
Forgot a couple USB configure device things
TheNathannator Apr 21, 2024
2065747
Don't default either backend to being enabled
TheNathannator Apr 21, 2024
6b097d9
Fix USB configure devices button not being disabled when starting
TheNathannator Apr 21, 2024
eaa0b15
Clarify USB configure devices button
TheNathannator Apr 21, 2024
7dea9a8
Map drums/cymbals fully separately in ViGEm drums mapper
TheNathannator Apr 21, 2024
e5870aa
Merge pull request #11 from TheNathannator/readme-overhaul
TheNathannator Apr 23, 2024
1bf17b4
Add Riffmaster information to the readme
TheNathannator Apr 23, 2024
e63de20
Clarify installation section of readme
TheNathannator Apr 24, 2024
a7df0ba
A couple more readme things
TheNathannator Apr 24, 2024
423d333
Map the joystick on Riffmasters in ViGEmBus mode
TheNathannator Apr 25, 2024
95a1e23
Fix an issue with the initialization sequence
TheNathannator Apr 25, 2024
c66e666
Revert a note in the readme
TheNathannator Apr 25, 2024
ca44928
Bump version to v4.2.0
TheNathannator Apr 25, 2024
a9d5cc2
Fix mapper mode changes not applying to WinUSB devices until a full a…
TheNathannator Apr 25, 2024
7ff1ded
Restart USB devices when starting/stopping to ensure proper function
TheNathannator Apr 25, 2024
ccff93d
Fix a couple potential mapping errors
TheNathannator Apr 25, 2024
691804d
Also mention the `Other devices` category in manual WinUSB removal in…
TheNathannator Apr 25, 2024
a3a6db9
A troubleshooting suggestion for USB devices
TheNathannator Apr 26, 2024
ae8f88c
Make XboxWinUsbDevice handle powering off when unsupported
TheNathannator Apr 27, 2024
8520f81
Add some notes about CH's automatic mappings
TheNathannator Apr 27, 2024
e8d4ece
Fix battery type property
TheNathannator May 9, 2024
03365b6
Update WiX toolset
TheNathannator May 9, 2024
111af84
Fix timestamp being written twice in packet logs
TheNathannator May 21, 2024
cd54eab
Fix Pcap packet logs not parsing in replay backend
TheNathannator May 21, 2024
27781e6
Add threading locks to logging code
TheNathannator May 24, 2024
f711b5d
Fix Pcap and replay backends not sending inputs
TheNathannator May 24, 2024
ed67406
Add GHWT:DE doc link
TheNathannator May 24, 2024
79887b2
Rename verbose error logging setting to just verbose logging
TheNathannator May 24, 2024
e3a37e4
Change some logging levels around
TheNathannator May 24, 2024
c582b82
Workaround for annoying assert condition that happens with real hardware
TheNathannator May 24, 2024
9cd9799
Fix verbose messages option label being cut off
TheNathannator May 24, 2024
640dde6
Update WiX to 5.0.0
TheNathannator May 27, 2024
987a851
Use patched ViGEm.NET version to fix some error handling issues
TheNathannator May 27, 2024
2cba8e8
Another ViGEm error handling fix
TheNathannator Jun 5, 2024
65f388f
Factor out interface for backend devices
TheNathannator Jun 5, 2024
48152ce
Add GameInput backend
TheNathannator Jun 6, 2024
3a0acc1
Add rumble test for gamepads to test output reports
TheNathannator Jun 6, 2024
871f87a
Make WinUSB device connection message non-verbose again
TheNathannator Jun 6, 2024
1bb950b
Replace Pcap backend with GameInput backend
TheNathannator Jun 6, 2024
cd7c8be
Add packet logging to GameInput backend
TheNathannator Jun 6, 2024
f702661
Fix window freezing when packet logging is enabled
TheNathannator Jun 6, 2024
d12c087
Update SharpGameInput
TheNathannator Jun 7, 2024
d71c5c2
Fix crashes caused by GameInput backend
TheNathannator Jun 8, 2024
973b467
Don't reboot USB devices if none are connected
TheNathannator Jun 8, 2024
5ec271b
Don't forget to set GameInput backend initialization flag
TheNathannator Jun 8, 2024
9cb6d09
Refactor GameInput input enabling/disabling
TheNathannator Jun 8, 2024
4499e08
A few misc. fixes
TheNathannator Jun 8, 2024
88046fc
Implement GameInput refresh button
TheNathannator Jun 8, 2024
0b8ea27
Log command ID in GameInput message sending
TheNathannator Jun 8, 2024
fb0aa66
Verify chunk sequence alignment and retry if a descriptor chunk is mi…
TheNathannator Jun 8, 2024
73ac1f3
Disable GameInput backend while configuring USB devices
TheNathannator Jun 8, 2024
6def499
Adjust text in USB device list window
TheNathannator Jun 8, 2024
c1064e9
Fix release-mode build
TheNathannator Jun 8, 2024
1f6edd4
Update installer configuration
TheNathannator Jun 8, 2024
d59281c
Turn installer into a bundle so we can include the GameInput redistri…
TheNathannator Jun 9, 2024
0298332
v5.0.0
TheNathannator Jun 9, 2024
06afa9c
Update readme
TheNathannator Jun 10, 2024
964e4ae
Update custom ViGEm.NET build once more
TheNathannator Jun 10, 2024
1d5cd8d
Fix SharpGameInput hint path
TheNathannator Jun 10, 2024
d406992
Fix missing using when sending GameInput reports
TheNathannator Jun 12, 2024
8f039f2
Fix guitar axis inputs not working correctly
TheNathannator Jun 14, 2024
aa8663f
v5.0.1.0
TheNathannator Jun 14, 2024
f961f92
Remove workaround in GuitarRPCS3Mapper for RPCS3 bindings menu
TheNathannator Jun 15, 2024
9cbf45e
v5.0.2
TheNathannator Jun 15, 2024
fc0b97d
Update program screenshot before I forget lol
TheNathannator Jun 27, 2024
507feca
Handle GameInput initialization failures more gracefully
TheNathannator Jun 29, 2024
3b9bdc3
Refactor/optimize TextBoxWriter
TheNathannator Jun 30, 2024
8cc94ca
Move most logging methods to the Logging class
TheNathannator Jun 30, 2024
972fcaf
Clean up unnecessary using directives
TheNathannator Jun 30, 2024
3109eb4
Add additional initialization checks to WinUSB backend
TheNathannator Jun 30, 2024
6125cc2
v5.0.3
TheNathannator Jun 30, 2024
3ab4c8b
Log ViGEmBus initialization failures
TheNathannator Jul 2, 2024
2151ea7
Fix exception when sending a command with no data through the GameInp…
TheNathannator Aug 1, 2024
4be121e
v5.0.4
TheNathannator Aug 1, 2024
efdc06c
Fix Riffmaster solo frets not being recognized correctly
TheNathannator Aug 2, 2024
ce5aec9
Correct how the solo fret flag is calculated
TheNathannator Aug 2, 2024
d1663fb
Get rid of XboxPacket and fix up various packet replay things
TheNathannator Aug 3, 2024
ea946ff
Add Clone Hero Spanish images
carlmylo Aug 5, 2024
937f8e9
Add RPCS3 images
carlmylo Aug 5, 2024
72832a9
Add RPCS3 Mapping and fix outdated text
carlmylo Aug 5, 2024
6b1396a
Create Spanish translation for Readme
carlmylo Aug 5, 2024
ce7d2ae
Add Language links
carlmylo Aug 5, 2024
6060d58
Fixed typo and missing bracket for URL.
carlmylo Aug 5, 2024
87d38ee
Final corrections.
carlmylo Aug 6, 2024
1ffbce4
Merge pull request #29 from carlmylo/translate
TheNathannator Aug 6, 2024
09926cb
Fall back onto a new dummy mapper when a device is unrecognized
TheNathannator Aug 13, 2024
2b91aee
Don't reject unsupported devices
TheNathannator Aug 13, 2024
d0db79f
Add missing colon to hardware ID lookup unsupported device message
TheNathannator Aug 13, 2024
4edb973
Fix duplicated debug logs
TheNathannator Aug 13, 2024
a92405d
Fix "Controller Emulation Mode" text getting cut off when bolded
TheNathannator Aug 13, 2024
137d388
v5.0.5
TheNathannator Aug 13, 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
Prev Previous commit
Next Next commit
Fix exception when sending a command with no data through the GameInp…
…ut backend
  • Loading branch information
TheNathannator committed Aug 1, 2024
commit 2151ea7b93c921279d2d619231cd48fe242f1f7a
11 changes: 7 additions & 4 deletions Program/PacketParsing/Backends/GameInputBackendDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,15 @@ public unsafe XboxResult SendMessage(XboxCommandHeader header, Span<byte> data)

using (report)
{
fixed (byte* ptr = data)
if (!data.IsEmpty)
{
if (!report.SetRawData((UIntPtr)data.Length, ptr))
fixed (byte* ptr = data)
{
Logging.WriteLineVerbose("Failed to set raw report data!");
continue;
if (!report.SetRawData((UIntPtr)data.Length, ptr))
{
Logging.WriteLineVerbose("Failed to set raw report data!");
continue;
}
}
}

Expand Down