1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 20:33:09 +08:00

Use Precision.AlmostBigger

This commit is contained in:
Salman Ahmed 2024-02-16 11:13:41 +03:00
parent 6a1d118b21
commit 952c5b0d18

View File

@ -15,6 +15,7 @@ using osu.Framework.Graphics.Transforms;
using osu.Framework.Input;
using osu.Framework.Screens;
using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Audio;
using osu.Game.Audio.Effects;
using osu.Game.Configuration;
@ -553,7 +554,7 @@ namespace osu.Game.Screens.Play
double aggregateVolumeTrack = audioManager.Volume.Value * audioManager.VolumeTrack.Value;
// Checks if the notification has not been shown yet and also if master volume is muted, track/music volume is muted or if the whole game is muted.
if (volumeOverlay?.IsMuted.Value == true || aggregateVolumeTrack <= volume_requirement)
if (volumeOverlay?.IsMuted.Value == true || Precision.AlmostBigger(volume_requirement, aggregateVolumeTrack))
{
notificationOverlay?.Post(new MutedNotification());
muteWarningShownOnce.Value = true;