diff --git a/Cartfile b/Cartfile index 6d10a3f..b19a532 100644 --- a/Cartfile +++ b/Cartfile @@ -1,4 +1,4 @@ -github "the0neyouseek/MediaKeyTap" "master" +github "the0neyouseek/MediaKeyTap" github "reitermarkus/DDC.swift" "master" github "rnine/AMCoreAudio" github "shpakovski/MASPreferences" diff --git a/Cartfile.resolved b/Cartfile.resolved index 47e69f7..f2ff341 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ github "reitermarkus/DDC.swift" "5c03666e17a1a850892c08a5db6f4a208f762f26" github "rnine/AMCoreAudio" "3.3" github "shpakovski/MASPreferences" "1.3" -github "the0neyouseek/MediaKeyTap" "abfe09f53ccabb1aa14a0f4ab99cfb8812f41919" +github "the0neyouseek/MediaKeyTap" "3.1.0" diff --git a/MonitorControl.xcodeproj/project.pbxproj b/MonitorControl.xcodeproj/project.pbxproj index d6458cd..8628c06 100644 --- a/MonitorControl.xcodeproj/project.pbxproj +++ b/MonitorControl.xcodeproj/project.pbxproj @@ -312,7 +312,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = "Guillaume Broder"; TargetAttributes = { 56754EAA1D9A4016007BCDC5 = { @@ -634,7 +634,9 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 560; DEVELOPMENT_TEAM = KGY56RWR9A; + ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", @@ -643,6 +645,7 @@ ); INFOPLIST_FILE = MonitorControl/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MARKETING_VERSION = 1.6.0; PRODUCT_BUNDLE_IDENTIFIER = me.guillaumeb.MonitorControl; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -658,7 +661,9 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 560; DEVELOPMENT_TEAM = KGY56RWR9A; + ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", @@ -667,6 +672,7 @@ ); INFOPLIST_FILE = MonitorControl/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MARKETING_VERSION = 1.6.0; PRODUCT_BUNDLE_IDENTIFIER = me.guillaumeb.MonitorControl; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -686,10 +692,13 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 560; DEVELOPMENT_TEAM = KGY56RWR9A; + ENABLE_HARDENED_RUNTIME = YES; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = MonitorControlHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MARKETING_VERSION = 1.6.0; PRODUCT_BUNDLE_IDENTIFIER = me.guillaumeb.MonitorControlHelper; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -708,10 +717,13 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 560; DEVELOPMENT_TEAM = KGY56RWR9A; + ENABLE_HARDENED_RUNTIME = YES; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = MonitorControlHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MARKETING_VERSION = 1.6.0; PRODUCT_BUNDLE_IDENTIFIER = me.guillaumeb.MonitorControlHelper; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/MonitorControl.xcodeproj/xcshareddata/xcschemes/MonitorControl.xcscheme b/MonitorControl.xcodeproj/xcshareddata/xcschemes/MonitorControl.xcscheme index 657c698..ab7eb7f 100644 --- a/MonitorControl.xcodeproj/xcshareddata/xcschemes/MonitorControl.xcscheme +++ b/MonitorControl.xcodeproj/xcshareddata/xcschemes/MonitorControl.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - 0, self.isMuted { self.mute(forceVolume: value) } else if value == 0 { @@ -85,7 +85,7 @@ class Display { } self.hideDisplayOsd() - self.showOsd(command: .audioSpeakerVolume, value: value) + self.showOsd(command: .audioSpeakerVolume, value: value, isSmallIncrement: isSmallIncrement) self.playVolumeChangedSound() } @@ -96,7 +96,7 @@ class Display { self.saveValue(value, for: .audioSpeakerVolume) } - func setBrightness(to value: Int) { + func setBrightness(to value: Int, isSmallIncrement: Bool = false) { if self.prefs.bool(forKey: Utils.PrefKeys.lowerContrast.rawValue) { if value == 0 { DispatchQueue.global(qos: .userInitiated).async { @@ -120,7 +120,7 @@ class Display { return } - self.showOsd(command: .brightness, value: value) + self.showOsd(command: .brightness, value: value, isSmallIncrement: isSmallIncrement) } if let slider = brightnessSliderHandler?.slider { @@ -161,7 +161,7 @@ class Display { return self.prefs.string(forKey: "friendlyName-\(self.identifier)") ?? self.name } - private func showOsd(command: DDC.Command, value: Int) { + private func showOsd(command: DDC.Command, value: Int, isSmallIncrement: Bool = false) { guard let manager = OSDManager.sharedManager() as? OSDManager else { return } @@ -176,7 +176,7 @@ class Display { } } - let step = maxValue / 16 + let step = isSmallIncrement ? maxValue / maxValue : maxValue / 16 manager.showImage(osdImage, onDisplayID: self.identifier, diff --git a/MonitorControl/Info.plist b/MonitorControl/Info.plist index a9bbddf..6b71f6c 100644 --- a/MonitorControl/Info.plist +++ b/MonitorControl/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.5.2 + $(MARKETING_VERSION) CFBundleVersion - 560 + $(CURRENT_PROJECT_VERSION) LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/MonitorControlHelper/Info.plist b/MonitorControlHelper/Info.plist index 59714ae..c85804b 100644 --- a/MonitorControlHelper/Info.plist +++ b/MonitorControlHelper/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.5.2 + $(MARKETING_VERSION) CFBundleVersion - 533 + $(CURRENT_PROJECT_VERSION) LSApplicationCategoryType public.app-category.utilities LSBackgroundOnly