Repository navigation
hid: answer vibration device mounted queries - #726
Closed
thehobbit85 wants to merge 1 commit into
Closed
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
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 free
to 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.
Superseded by main
Main landed the same public vibration-device query in 6fe1927e, after this PR was opened. Its
h && vib_targets(*h)expression returns the same normalized boolean as this PR. The runtime fix for #715 is therefore already present, with tests and documentation. Closing this duplicate PR; its broader synthetic coverage remains available in the branch.What and why
Odyssey 1.4.1 asks whether a vibration device is mounted when entering a Sand Kingdom pipe. The query was missing from HID takeovers, so it ran the SDK's
hidIPC client, failed to connect to the unsupported service, and dereferenced its null service object. Take over the public query and answer from the same validated live channel targets used by device information and vibration sends.The answer is a normalized boolean, including player 2 or merged-controller output masks. Invalid/stale handles, no sink, disabled rumble and missing outputs return false; a playback suspension does not unmount a routed output. The change is general and adds no game profile rules.
Fixes #715.
Checked
t_hidpasses 162 checks, covering output attachment/removal, cached startup handles, invalid handles, docked/handheld changes, player isolation/merging, suspended playback and disabled rumble.make -C dm/host/tests GAME=0100000000010000 run: pass.make -C dm/host/tests GAME=0100000000010000 asan tsan-threads: pass (full ASan/UBSan suite and general thread targets);make -C dm/host/tests GAME=0100000000010000 tsan: pass, including 162 HID checks.git diff --checkclean.IsVibrationDeviceMountedand715return none; inspected the overlapping vibration-handle (Vibration handles before a controller's haptics are routed (a game that asks once at startup lost every value) #246), original vibration (Switch HD vibration on iOS: nn::hid's rumble goes to Core Haptics #86) and Switch 2 BLE (iOS: Switch 2 Pro Controller over CoreBluetooth #645) diffs. Current main still lacks this takeover.No game files or controller hardware were used. The reported stack establishes the missing SDK call and the synthetic tests exercise its host replacement. The Sand Kingdom route and physical rumble have not been gameplay/device validated. No shader-chain files changed.
Static impact (no local game files)
regress.py impact
origin/main..HEAD0 games use what the change touches, 0 only through a broad rule (every game of its API), 4 not affected, 112 unknown (no usage manifest); 5 files changed, 2 NVN / HLE entry points reached through the host's callers, 0 rules of dm/tools/impact_map.tsv
010053501297400001007EF00011E0000100A3D008C5C0000100F2C0115B6000Unknown (no usage.tsv): 112 profiles (--all lists them).
Why
hle:_ZN2nn3hid24IsVibrationDeviceMountedERKNS0_21VibrationDeviceHandleE← dm/host/hle_hid.c: calls reach it from h_hid_SixFw, h_hid_VibMountedhle:_ZN2nn3hid41IsFirmwareUpdateAvailableForSixAxisSensorERKNS0_19SixAxisSensorHandleE← dm/host/hle_hid.c: calls reach it from h_hid_SixFw, h_hid_VibMountedThe new query is not recorded in the four committed usage manifests, so that report does not establish that other games are unaffected. The issue establishes Odyssey reaches it; runtime validation remains open for Odyssey and other importers.
Docs
Added the service finding and Odyssey note; regenerated the symptom index.