forked from Shinonome/dots-hyprland
audio: make volume not stuck over max (#1411)
This commit is contained in:
@@ -41,7 +41,7 @@ Singleton {
|
|||||||
root.sinkProtectionTriggered("Illegal increment");
|
root.sinkProtectionTriggered("Illegal increment");
|
||||||
} else if (newVolume > maxAllowed) {
|
} else if (newVolume > maxAllowed) {
|
||||||
root.sinkProtectionTriggered("Exceeded max allowed");
|
root.sinkProtectionTriggered("Exceeded max allowed");
|
||||||
sink.audio.volume = lastVolume;
|
sink.audio.volume = Math.min(lastVolume, maxAllowed);
|
||||||
}
|
}
|
||||||
if (sink.ready && (isNaN(sink.audio.volume) || sink.audio.volume === undefined || sink.audio.volume === null)) {
|
if (sink.ready && (isNaN(sink.audio.volume) || sink.audio.volume === undefined || sink.audio.volume === null)) {
|
||||||
sink.audio.volume = 0;
|
sink.audio.volume = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user