forked from Shinonome/dots-hyprland
audio: protection: don't change volume to NaN (#1411)
This commit is contained in:
@@ -40,8 +40,8 @@ Singleton {
|
|||||||
sink.audio.volume = lastVolume;
|
sink.audio.volume = lastVolume;
|
||||||
root.sinkProtectionTriggered("Illegal increment");
|
root.sinkProtectionTriggered("Illegal increment");
|
||||||
} else if (newVolume > maxAllowed) {
|
} else if (newVolume > maxAllowed) {
|
||||||
sink.audio.volume = lastVolume;
|
|
||||||
root.sinkProtectionTriggered("Exceeded max allowed");
|
root.sinkProtectionTriggered("Exceeded max allowed");
|
||||||
|
sink.audio.volume = lastVolume === NaN ? 0 : lastVolume;
|
||||||
}
|
}
|
||||||
lastVolume = sink.audio.volume;
|
lastVolume = sink.audio.volume;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user