Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2b19cdc authored by Joen Chen's avatar Joen Chen Committed by Automerger Merge Worker
Browse files

Merge "Set mBrightness when needsComposite is zero" into tm-qpr-dev am: ced82308

parents 0f91a8d7 ced82308
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -334,8 +334,10 @@ void DisplayDevice::stageBrightness(float brightness) {
}

void DisplayDevice::persistBrightness(bool needsComposite) {
    if (needsComposite && mStagedBrightness && mBrightness != *mStagedBrightness) {
    if (mStagedBrightness && mBrightness != *mStagedBrightness) {
        if (needsComposite) {
            getCompositionDisplay()->setNextBrightness(*mStagedBrightness);
        }
        mBrightness = *mStagedBrightness;
    }
    mStagedBrightness = std::nullopt;