From 19a8da9db7af904dabd1e33ff51eda7ea27db108 Mon Sep 17 00:00:00 2001 From: waydabber <37590873+waydabber@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:20:24 +0100 Subject: [PATCH] Added M2 support --- m1ddc.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m1ddc.m b/m1ddc.m index 8337e3c..3303a49 100644 --- a/m1ddc.m +++ b/m1ddc.m @@ -28,8 +28,8 @@ int main(int argc, char** argv) { IOAVServiceRef avService; - NSString *returnText =@"Controls volume, luminance (brightness), contrast, color gain, input of a single external Display connected via USB-C (DisplayPort Alt Mode) over DDC on an M1 Mac.\n" - "Control of displays attached via the HDMI port or by other means is not currently supported.\n" + NSString *returnText =@"Controls volume, luminance (brightness), contrast, color gain, input of an external Display connected via USB-C (DisplayPort Alt Mode) over DDC on an Apple Silicon Mac.\n" + "Displays attached via the built-in HDMI port of M1 or entry level M2 Macs are not supported.\n" "\n" "Usage examples:\n" "\n" @@ -118,7 +118,7 @@ int main(int argc, char** argv) { while ((service = IOIteratorNext(iter)) != MACH_PORT_NULL) { io_name_t name; IORegistryEntryGetName(service, name); - if ( !strcmp(name, "AppleCLCD2") ) { + if ( !strcmp(name, "AppleCLCD2") || !strcmp(name, "IOMobileFramebufferShim") ) { CFStringRef edidUUID = IORegistryEntrySearchCFProperty(service, kIOServicePlane, edidUUIDKey, kCFAllocatorDefault, kIORegistryIterateRecursively);