diff options
Diffstat (limited to 'libs/input/TouchVideoFrame.cpp')
-rw-r--r-- | libs/input/TouchVideoFrame.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/input/TouchVideoFrame.cpp b/libs/input/TouchVideoFrame.cpp index c62e0985f1..6d7d5614c6 100644 --- a/libs/input/TouchVideoFrame.cpp +++ b/libs/input/TouchVideoFrame.cpp @@ -40,16 +40,19 @@ const std::vector<int16_t>& TouchVideoFrame::getData() const { return mData; } const struct timeval& TouchVideoFrame::getTimestamp() const { return mTimestamp; } -void TouchVideoFrame::rotate(int32_t orientation) { +void TouchVideoFrame::rotate(ui::Rotation orientation) { switch (orientation) { - case DISPLAY_ORIENTATION_90: - rotateQuarterTurn(false /*clockwise*/); + case ui::ROTATION_90: + rotateQuarterTurn(/*clockwise=*/false); break; - case DISPLAY_ORIENTATION_180: + case ui::ROTATION_180: rotate180(); break; - case DISPLAY_ORIENTATION_270: - rotateQuarterTurn(true /*clockwise*/); + case ui::ROTATION_270: + rotateQuarterTurn(/*clockwise=*/true); + break; + case ui::ROTATION_0: + // No need to rotate if there's no rotation. break; } } |