From 14db417e122d9a8d842f851234b30030ba28ef22 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 8 Mar 2022 21:32:27 -0800 Subject: [PATCH] Reenable getting the serial number on macOS We filter now on game controllers, so we shouldn't hit the crash bug on random devices that this was working around. --- src/hidapi/mac/hid.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/hidapi/mac/hid.c b/src/hidapi/mac/hid.c index 6e7028501..716c7debb 100644 --- a/src/hidapi/mac/hid.c +++ b/src/hidapi/mac/hid.c @@ -326,10 +326,7 @@ static int get_string_property_utf8(IOHIDDeviceRef device, CFStringRef prop, cha static int get_serial_number(IOHIDDeviceRef device, wchar_t *buf, size_t len) { - // This crashes on M1 Macs, tracked by radar bug 79667729 - //return get_string_property(device, CFSTR(kIOHIDSerialNumberKey), buf, len); - buf[0] = 0; - return 0; + return get_string_property(device, CFSTR(kIOHIDSerialNumberKey), buf, len); } static int get_manufacturer_string(IOHIDDeviceRef device, wchar_t *buf, size_t len)