Skip to content

Commit

Permalink
fix: scope of Volume setter and event invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
agaertner committed Apr 14, 2024
1 parent 0f7a64f commit e3b4bd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Blish HUD/GameServices/GameIntegration/AudioIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public enum Devices {
/// </summary>
public float Volume {
get => _volume ??= GetVolume();
set {
if (_volume != value) {
private set {
if (Math.Abs(_volume.GetValueOrDefault() - value) > 0.0001f) {
_volume = value;
VolumeChanged?.Invoke(this, new ValueEventArgs<float>(value));
}
Expand Down

0 comments on commit e3b4bd9

Please sign in to comment.