Skip to content

Commit

Permalink
Fixed short-circuit evaluation from brightness bound overrides. (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
damiponce committed Jul 22, 2024
1 parent 21c7ffb commit e46b5f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions WhateverGreen/kern_igfx_backlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,9 +1355,10 @@ void IGFX::BacklightSmoother::processKernel(KernelPatcher &patcher, DeviceInfo *
DBGLOG("igfx", "BLS: User requested threshold = %u.", threshold);
if (WIOKit::getOSDataValue(info->videoBuiltin, "backlight-smoother-queue-size", queueSize))
DBGLOG("igfx", "BLS: User requested queue size = %u.", queueSize);
if (WIOKit::getOSDataValue(info->videoBuiltin, "backlight-smoother-lowerbound", brightnessRange.first) ||
WIOKit::getOSDataValue(info->videoBuiltin, "backlight-smoother-upperbound", brightnessRange.second))
DBGLOG("igfx", "BLS: User requested brightness range = [%u, %u].", brightnessRange.first, brightnessRange.second);
if (WIOKit::getOSDataValue(info->videoBuiltin, "backlight-smoother-lowerbound", brightnessRange.first))
DBGLOG("igfx", "BLS: User requested brightness lower bound = %u.", brightnessRange.first);
if (WIOKit::getOSDataValue(info->videoBuiltin, "backlight-smoother-upperbound", brightnessRange.second))
DBGLOG("igfx", "BLS: User requested brightness upper bound = %u.", brightnessRange.second);

// Sanitize user configurations
if (steps == 0) {
Expand Down

0 comments on commit e46b5f4

Please sign in to comment.