Fix volume control issue when only internal display is present (#680)

This commit is contained in:
Istvan T 2021-10-07 18:04:48 +02:00 committed by GitHub
parent e8ec8cdc7a
commit 8a10fcdd31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>6440</string>
<string>6443</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>

View file

@ -173,7 +173,7 @@ class MediaKeyTapManager: MediaKeyTapDelegate {
keys.removeAll { keysToDelete.contains($0) }
}
// Remove volume related keys if audio device is controllable
if !isInternalDisplayOnly, let defaultAudioDevice = app.coreAudio.defaultOutputDevice {
if let defaultAudioDevice = app.coreAudio.defaultOutputDevice {
let keysToDelete: [MediaKey] = [.volumeUp, .volumeDown, .mute]
if !prefs.bool(forKey: PrefKey.allScreensVolume.rawValue), prefs.bool(forKey: PrefKey.useAudioDeviceNameMatching.rawValue) {
if DisplayManager.shared.updateAudioControlTargetDisplays(deviceName: defaultAudioDevice.name) == 0 {

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>6440</string>
<string>6443</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSBackgroundOnly</key>