diff --git a/Hackintool.xcodeproj/project.pbxproj b/Hackintool.xcodeproj/project.pbxproj index 1c2e2194..85f48eaf 100644 --- a/Hackintool.xcodeproj/project.pbxproj +++ b/Hackintool.xcodeproj/project.pbxproj @@ -721,7 +721,7 @@ CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 0387; + CURRENT_PROJECT_VERSION = 0388; DEVELOPMENT_TEAM = 5LGHPJM9ZR; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = NO; @@ -736,7 +736,7 @@ INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 3.8.7; + MARKETING_VERSION = 3.8.8; PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -757,7 +757,7 @@ CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 0387; + CURRENT_PROJECT_VERSION = 0388; DEVELOPMENT_TEAM = 5LGHPJM9ZR; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = NO; @@ -772,7 +772,7 @@ INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 3.8.7; + MARKETING_VERSION = 3.8.8; PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Hackintool.xcodeproj/project.xcworkspace/xcuserdata/headsoft.xcuserdatad/UserInterfaceState.xcuserstate b/Hackintool.xcodeproj/project.xcworkspace/xcuserdata/headsoft.xcuserdatad/UserInterfaceState.xcuserstate index 7b65809e..9e3cd5a2 100644 Binary files a/Hackintool.xcodeproj/project.xcworkspace/xcuserdata/headsoft.xcuserdatad/UserInterfaceState.xcuserstate and b/Hackintool.xcodeproj/project.xcworkspace/xcuserdata/headsoft.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Hackintool/IORegTools.m b/Hackintool/IORegTools.m index a4231cdc..23a167b2 100644 --- a/Hackintool/IORegTools.m +++ b/Hackintool/IORegTools.m @@ -1988,39 +1988,43 @@ bool getScreenNumberForDisplay(SInt32 myVendorID, SInt32 myProductID, SInt32 myS { io_service_t servicePort = CGDisplayIOServicePort(directDisplayIDArray[i]); - if (!servicePort) - continue; - - CFDictionaryRef displayInfo = IODisplayCreateInfoDictionary(servicePort, kIODisplayMatchingInfo); - - CFNumberRef vendorIDRef = nil; - CFNumberRef productIDRef = nil; - CFNumberRef serialNumberRef = nil; - SInt32 vendorID = 0, productID = 0, serialNumber = 0; + if (servicePort) + { + CFDictionaryRef displayInfo = IODisplayCreateInfoDictionary(servicePort, kIODisplayMatchingInfo); - Boolean success; - success = CFDictionaryGetValueIfPresent(displayInfo, CFSTR(kDisplayVendorID), (const void **)&vendorIDRef); - success &= CFDictionaryGetValueIfPresent(displayInfo, CFSTR(kDisplayProductID), (const void **)&productIDRef); + if (displayInfo) + { + CFNumberRef vendorIDRef = nil; + CFNumberRef productIDRef = nil; + CFNumberRef serialNumberRef = nil; + SInt32 vendorID = 0, productID = 0, serialNumber = 0; - if (success) - { - CFNumberGetValue(vendorIDRef, kCFNumberSInt32Type, &vendorID); - CFNumberGetValue(productIDRef, kCFNumberSInt32Type, &productID); - } + if (CFDictionaryGetValueIfPresent(displayInfo, CFSTR(kDisplayVendorID), (const void **)&vendorIDRef)) + { + CFNumberGetValue(vendorIDRef, kCFNumberSInt32Type, &vendorID); + } + + if (CFDictionaryGetValueIfPresent(displayInfo, CFSTR(kDisplayProductID), (const void **)&productIDRef)) + { + CFNumberGetValue(productIDRef, kCFNumberSInt32Type, &productID); + } - if (CFDictionaryGetValueIfPresent(displayInfo, CFSTR(kDisplaySerialNumber), (const void **)&serialNumberRef)) - { - CFNumberGetValue(serialNumberRef, kCFNumberSInt32Type, &serialNumber); - } + if (CFDictionaryGetValueIfPresent(displayInfo, CFSTR(kDisplaySerialNumber), (const void **)&serialNumberRef)) + { + CFNumberGetValue(serialNumberRef, kCFNumberSInt32Type, &serialNumber); + } - if (myVendorID == vendorID && myProductID == productID && mySerialNumber == serialNumber) - { - *directDisplayID = directDisplayIDArray[i]; + if (myVendorID == vendorID && myProductID == productID && mySerialNumber == serialNumber) + { + *directDisplayID = directDisplayIDArray[i]; - retval = true; + retval = true; + } + + CFRelease(displayInfo); + } } - CFRelease(displayInfo); IOObjectRelease(servicePort); } diff --git a/Hackintool/MiscTools.m b/Hackintool/MiscTools.m index 0b89dd90..3cb787b9 100644 --- a/Hackintool/MiscTools.m +++ b/Hackintool/MiscTools.m @@ -664,56 +664,59 @@ unsigned long long binaryToDecimal(NSString *str) NSOperatingSystemVersion version = [processInfo operatingSystemVersion]; NSString *osVersionString = [processInfo operatingSystemVersionString]; NSString *codeName = @""; - - if (version.majorVersion == 10) - { - switch(version.minorVersion) - { - case 4: - codeName = @"Mac OS X Tiger"; - break; - case 5: - codeName = @"Mac OS X Leopard"; - break; - case 6: - codeName = @"Mac OS X Snow Leopard"; - break; - case 7: - codeName = @"Mac OS X Lion"; - break; - case 8: - codeName = @"OS X Mountain Lion"; - break; - case 9: - codeName = @"OS X Mavericks"; - break; - case 10: - codeName = @"OS X Yosemite"; - break; - case 11: - codeName = @"OS X El Capitan"; - break; - case 12: - codeName = @"macOS Sierra"; - break; - case 13: - codeName = @"macOS High Sierra"; - break; - case 14: - codeName = @"macOS Mojave"; - break; - case 15: - codeName = @"macOS Catalina"; - break; - } - } - else if (version.majorVersion == 11) - { - codeName = @"macOS Big Sur"; - } - else if (version.majorVersion == 12) + + switch(version.majorVersion) { + case 10: + switch(version.minorVersion) + { + case 4: + codeName = @"Mac OS X Tiger"; + break; + case 5: + codeName = @"Mac OS X Leopard"; + break; + case 6: + codeName = @"Mac OS X Snow Leopard"; + break; + case 7: + codeName = @"Mac OS X Lion"; + break; + case 8: + codeName = @"OS X Mountain Lion"; + break; + case 9: + codeName = @"OS X Mavericks"; + break; + case 10: + codeName = @"OS X Yosemite"; + break; + case 11: + codeName = @"OS X El Capitan"; + break; + case 12: + codeName = @"macOS Sierra"; + break; + case 13: + codeName = @"macOS High Sierra"; + break; + case 14: + codeName = @"macOS Mojave"; + break; + case 15: + codeName = @"macOS Catalina"; + break; + } + break; + case 11: + codeName = @"macOS Big Sur"; + break; + case 12: codeName = @"macOS Monterey"; + break; + case 13: + codeName = @"macOS Ventura"; + break; } return [NSString stringWithFormat:@"%@ %@", codeName, osVersionString];