Skip to content

Commit 96c7c29

Browse files
committed
Brightness (macOS): prioritizes DDC/CI reply over simple I²C transaction
1 parent 554e7bc commit 96c7c29

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/detection/brightness/brightness_apple.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,11 @@ static IOOptionBits getSupportedTransactionType(void) {
140140
int64_t types = 0;
141141
ffCfNumGetInt64(IOI2CTransactionTypes, &types);
142142

143-
/*
144-
We want DDCciReply but Simple is better than No-thing.
145-
Combined and DisplayPortNative are not useful in our case.
146-
*/
147143
if (types) {
148-
if ((1 << kIOI2CSimpleTransactionType) & (uint64_t) types)
149-
return kIOI2CSimpleTransactionType;
150144
if ((1 << kIOI2CDDCciReplyTransactionType) & (uint64_t) types)
151145
return kIOI2CDDCciReplyTransactionType;
146+
if ((1 << kIOI2CSimpleTransactionType) & (uint64_t) types)
147+
return kIOI2CSimpleTransactionType;
152148
if ((1 << kIOI2CCombinedTransactionType) & (uint64_t) types)
153149
return kIOI2CCombinedTransactionType;
154150
if ((1 << kIOI2CDisplayPortNativeTransactionType) & (uint64_t) types)

0 commit comments

Comments
 (0)