mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: disable fan reset if the fan is in the automatic mode and the app does not have permissions (#1053)
This commit is contained in:
@@ -629,6 +629,8 @@ internal class FanView: NSStackView {
|
||||
}
|
||||
|
||||
@objc private func sleepListener(aNotification: NSNotification) {
|
||||
guard SMCHelper.shared.checkRights() && self.fan.customMode != .automatic else { return }
|
||||
|
||||
self.willSleepMode = self.fan.customMode
|
||||
self.willSleepSpeed = self.fan.customSpeed
|
||||
SMCHelper.shared.setFanMode(fan.id, mode: FanMode.automatic.rawValue)
|
||||
|
||||
Reference in New Issue
Block a user