You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no OSD indicator for brightness when controlling backlight for screenpad devices. This may limit the practicality of ACPI patches that implement more than a handful of brightness steps. Refer to SSDT-SPLC.dsl#L42-L63 for an implementation example.
There is already a function for extracting and calling the same OSD method in AsusSMC (AsusSMCDaemon/OSD.h), though perhaps a clearer reference comes from ExternalDisplayBrightness for handling multiple displays:
// @fnesveda/ExternalDisplayBrightness/src/ExternalDisplayBrightness/BrightnessManager.swift#L330-L349330 | // shows the brightness HUD with the correct brightness indicator on the correct display331 | // unfortunately Apple doesn't provide a public API for this, so we have to manually extract the function from the OSD framework332 | private static var showBrightnessHUD:((CGDirectDisplayID, Int, Int)-> Void)?{333 | if let osdLoaded =Bundle(path:"/System/Library/PrivateFrameworks/OSD.framework")?.load(), osdLoaded {334 | if let sharedOSDManager =NSClassFromString("OSDManager")?.value(forKeyPath:"sharedManager")asAnyObject?{335 | let showImageSelector =Selector(("showImage:onDisplayID:priority:msecUntilFade:filledChiclets:totalChiclets:locked:"))336 | if sharedOSDManager.responds(to: showImageSelector){337 | let showImageImplementation = sharedOSDManager.method(for: showImageSelector)338 |
339 | typealias ShowImageFunctionType = @convention(c)(AnyObject, Selector, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32, Bool)-> Void
340 | let showImage =unsafeBitCast(showImageImplementation, to:ShowImageFunctionType.self)341 |
342 | return {(onDisplayID:CGDirectDisplayID, filledChiclets:Int, totalChiclets:Int)->Voidin343 | showImage(sharedOSDManager, showImageSelector,1, onDisplayID,0x1f3,1000,UInt32(filledChiclets),UInt32(totalChiclets), false)344 | }345 | }346 | }347 | }348 | return nil349 | }
The text was updated successfully, but these errors were encountered:
There is currently no OSD indicator for brightness when controlling backlight for screenpad devices. This may limit the practicality of ACPI patches that implement more than a handful of brightness steps. Refer to SSDT-SPLC.dsl#L42-L63 for an implementation example.
There is already a function for extracting and calling the same OSD method in AsusSMC (AsusSMCDaemon/OSD.h), though perhaps a clearer reference comes from ExternalDisplayBrightness for handling multiple displays:
The text was updated successfully, but these errors were encountered: