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

Commit 75fd4b82 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 am: f2b19cdc

parents aefa3659 f2b19cdc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -312,8 +312,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;