Uh oh!
There was an error while loading. Please reload this page.
endgame: stop identifying the XM2w 4K v2 as an OP1w 4K v2 - #61
Merged
Conversation
The OP1w and XM2w 4K v2 mice share the same 0x1970/0x1984 dongle PID (the receiver hardware doesn't distinguish them), but eggProfileForPid only ever looked the PID up in a table that hardcodes the OP1w name for both entries — every XM2w 4K v2 behind that dongle reported itself as an OP1w 4K v2. egg-we-hid.ts already solved this exact problem for the older OP1we/XM2we pair by checking device.productName; do the same here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Reported: the Endgame Gear XM2w 4K v2 was showing up as an "OP1w 4K v2".
The OP1w and XM2w 4K v2 mice share the same wireless dongle USB PID (0x1970/0x1984) — the receiver hardware doesn't distinguish the paired mouse, only the mouse's own reported name does.
eggProfileForPidonly ever did a PID-keyed lookup into a table that hardcodes the OP1w 4K v2 name for both PID entries, so every XM2w 4K v2 behind that dongle reported itself as an OP1w 4K v2.egg-we-hid.tsalready solved this exact problem for the older OP1we/XM2we pair (which reuse PID 0x1970 too) by checkingdevice.productName. This applies the same fix toeggProfileForPid: it now takes an optional product name and resolves the shared-PID case to an "Endgame Gear XM2w 4K v2" profile when the name mentions "xm2".