Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wormyrocks committed Feb 19, 2021
1 parent b7f3fad commit 1a9f297
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cocoa_monitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ GLFWAPI bool glfwGetM1DisplayParams(GLFWmonitor* handle, char * name, char * ser
while ((service = IOIteratorNext(it)) != 0)
{
// NSLog(@"DisplayID props -> VID=%x PID=%x UN=%d SN=%x", CGDisplayVendorNumber(displayID), CGDisplayModelNumber(displayID), CGDisplayUnitNumber(displayID), CGDisplaySerialNumber(displayID));
CFDictionaryRef props;
CFMutableDictionaryRef props;
kern_return_t t = IORegistryEntryCreateCFProperties(service, &props, kCFAllocatorDefault, kNilOptions);
if (t == KERN_SUCCESS) {
CFDictionaryRef dispAttributes = CFDictionaryGetValue(props, CFSTR("DisplayAttributes"));
Expand All @@ -749,7 +749,7 @@ GLFWAPI bool glfwGetM1DisplayParams(GLFWmonitor* handle, char * name, char * ser
continue;
}
ref = CFDictionaryGetValue(prodAttributes, CFSTR("SerialNumber"));
if (ref && CFNumberGetValue(ref, kCFNumberSInt32Type, &uint_val) && uint_val==CGDisplaySerialNumber(displayID)) numeric_serial = uint_val;
if (ref && CFNumberGetValue(ref, kCFNumberSInt32Type, &uint_val) && uint_val==CGDisplaySerialNumber(displayID)) *numeric_serial = uint_val;
else {
CFRelease(ref);
continue;
Expand Down Expand Up @@ -781,4 +781,4 @@ GLFWAPI bool glfwGetM1DisplayParams(GLFWmonitor* handle, char * name, char * ser
IOObjectRelease(it);
NSLog(@"Done");
return ret;
}
}

0 comments on commit 1a9f297

Please sign in to comment.