Repository navigation
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.
Fixes three small issues with the playback logic inside the HD Haptics system for DualSense controllers.
The clip length was calculated by integer division which reduced clips shorter than 1 second to 0 ticks, causing the next clip to be appended to the previous one instead of getting it's own stream.
Sounds that aren't cached at the time of playback were loaded on a background thread, which could cause the driver's stream list to be updated while the client thread was also working on it.
updateHDHapticremoved an expired stream by index inside a loop, causing the next stream to be skipped.Fixes:
Round up to a minimum of one tick
Playback runs on the client thread with
Minecraft.executeSwitch to an iterator.
Testing:
Verified on Linxu with a wired DualSense controller and Controlify's built-in haptics. Builds and tests pass on 26.3.