summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index 69ea7dfcb5..8974b22c86 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -343,6 +343,11 @@ void PointerCoords::scale(float globalScaleFactor, float windowXScale, float win
scaleAxisValue(*this, AMOTION_EVENT_AXIS_RELATIVE_Y, windowYScale);
}
+void PointerCoords::applyOffset(float xOffset, float yOffset) {
+ setAxisValue(AMOTION_EVENT_AXIS_X, getX() + xOffset);
+ setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset);
+}
+
#ifdef __linux__
status_t PointerCoords::readFromParcel(Parcel* parcel) {
bits = parcel->readInt64();