frontend: Fix audio mixer sorting weight

Pinned sources were appearing before Global, which was not intended
This commit is contained in:
Warchamp7
2026-03-19 05:17:52 -04:00
committed by Ryan Foster
parent eee47579be
commit 8308f1358c

View File

@@ -652,27 +652,27 @@ void AudioMixer::updateVolumeLayouts()
hiddenCount += 1;
}
if (!isGlobal) {
sortingWeight += 20;
}
if (!isPinned) {
sortingWeight += 20;
if (isGlobal) {
sortingWeight = 0;
} else if (isPinned) {
sortingWeight = 20;
} else {
sortingWeight = 40;
}
if (isHidden && keepHiddenLast) {
sortingWeight += 20;
sortingWeight += 5;
if (isPreviewed) {
sortingWeight -= 10;
sortingWeight -= 1;
}
}
if (!isAudioActive && keepInactiveLast) {
sortingWeight += 50;
sortingWeight += 5;
if (isPreviewed) {
sortingWeight -= 10;
sortingWeight -= 1;
}
}