Skip to content

Commit

Permalink
Small code improvements
Browse files Browse the repository at this point in the history
Rename some parameters in some functions to be more intuitive.
  • Loading branch information
fnesveda committed Dec 2, 2019
1 parent 1aaf44c commit 42e71af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ExternalDisplayBrightness/DDC.swift
Expand Up @@ -59,7 +59,7 @@ enum DDC {
}

// get framebuffer port for a display
private static func getIOFramebufferPort(fromDisplayID displayID: CGDirectDisplayID ) -> io_service_t? {
private static func getIOFramebufferPort(forDisplay displayID: CGDirectDisplayID) -> io_service_t? {
if CGDisplayIsBuiltin(displayID) != 0 {
return nil
}
Expand Down Expand Up @@ -130,7 +130,7 @@ enum DDC {
let displayQueue = getDispatchQueue(forDisplayID: displayID)
var result = false
displayQueue.sync {
if let framebufferPort: io_service_t = getIOFramebufferPort(fromDisplayID: displayID) {
if let framebufferPort: io_service_t = getIOFramebufferPort(forDisplay: displayID) {
defer { IOObjectRelease(framebufferPort) }
var busCount: io_service_t = 0
if IOFBGetI2CInterfaceCount(framebufferPort, &busCount) == kIOReturnSuccess {
Expand Down

0 comments on commit 42e71af

Please sign in to comment.