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

Commit 4237a95f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "getDisplayViewportByType doesn't count more than one viewport"

parents 22edf7e6 7d384731
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -114,8 +114,10 @@ std::optional<DisplayViewport> InputReaderConfiguration::getDisplayViewportByTyp
    std::optional<DisplayViewport> result = std::nullopt;
    for (const DisplayViewport& currentViewport : mDisplays) {
        // Return the first match
        if (currentViewport.type == type && !result) {
        if (currentViewport.type == type) {
            if (!result) {
                result = std::make_optional(currentViewport);
            }
            count++;
        }
    }