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

Commit 9ad73bc2 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

Get screencap working correctly in landscape mode

Bug: b/112869712
Test: adb shell screencap in all screen rotations
Change-Id: I62b38775f8253bea85a1870ad63cd27715754656
Merged-In: I62b38775f8253bea85a1870ad63cd27715754656
parent 22f1e9cf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4833,8 +4833,8 @@ status_t SurfaceFlinger::captureScreen(const sp<IBinder>& display, sp<GraphicBuf
        sourceCrop.set(dispScissor);
        // adb shell screencap will default reqWidth and reqHeight to zeros.
        if (reqWidth == 0 || reqHeight == 0) {
            reqWidth = uint32_t(dispScissor.width());
            reqHeight = uint32_t(dispScissor.height());
            reqWidth = uint32_t(device->getViewport().width());
            reqHeight = uint32_t(device->getViewport().height());
        }
    }