Skip to content

Commit 09e5e2a

Browse files
committed
fix(Intel): hacky workaround for ddc unreliability
Requires a proper fix in the future, see: MonitorControl#478
1 parent 4f99be0 commit 09e5e2a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

MonitorControl/Model/ExternalDisplay.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,13 @@ class ExternalDisplay: Display {
286286
return self.arm64ddcComm(send: &send, reply: &reply)
287287

288288
#else
289-
290-
return self.ddc?.write(command: command, value: value, errorRecoveryWaitTime: 2000)
289+
// NOTE: Loop is a hacky workaround that should probably be removed as it wasn't necessary before and makes things choppy.
290+
// SEE: https://github.com/MonitorControl/MonitorControl/issues/478
291+
var success = false
292+
for _ in 1 ... 2 {
293+
success = self.ddc?.write(command: command, value: value, errorRecoveryWaitTime: 2000) ?? false
294+
}
295+
return success
291296

292297
#endif
293298
}

0 commit comments

Comments
 (0)