Skip to content

Commit

Permalink
Fix rounding errors with MIDI velocity threshold setting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNathannator committed Sep 21, 2024
1 parent 5124f81 commit a91c6ac
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using TMPro;
using UnityEngine;
using YARG.Input;
Expand Down Expand Up @@ -29,7 +30,7 @@ public override void Init(ButtonBinding binding, SingleButtonBinding singleBindi

// Set with notify for propogation to other components
_velocityThresholdSlider.SetValueWithoutNotify(MAX_VELOCITY); // Ensure change event is fired, this starts at 1
_velocityThresholdSlider.Value = (int) (singleBinding.PressPoint * MAX_VELOCITY);
_velocityThresholdSlider.Value = (int) Math.Round(singleBinding.PressPoint * MAX_VELOCITY);
_debounceModeDropdown.value = (int) singleBinding.DebounceMode;
_debounceSlider.Value = singleBinding.DebounceThreshold;

Expand Down

0 comments on commit a91c6ac

Please sign in to comment.