Improved dummy detection for newer versions of BetterDummy (#975)

This commit is contained in:
Istvan Toth 2022-03-15 11:53:28 +01:00 committed by GitHub
parent b07d762c9b
commit e2009a62ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

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

View file

@ -399,13 +399,13 @@ class DisplayManager {
}
static func isDummy(displayID: CGDirectDisplayID) -> Bool {
let vendorNumber = CGDisplayVendorNumber(displayID)
let rawName = DisplayManager.getDisplayRawNameByID(displayID: displayID)
var isDummy: Bool = false
if rawName.lowercased().contains("dummy") {
if rawName.lowercased().contains("dummy") || (self.isVirtual(displayID: displayID) && vendorNumber == UInt32(0xF0F0)) {
os_log("NOTE: Display is a dummy!", type: .info)
isDummy = true
return true
}
return isDummy
return false
}
static func isVirtual(displayID: CGDirectDisplayID) -> Bool {

View file

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