We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1038d1 commit 9eddd5eCopy full SHA for 9eddd5e
src/src/org/renpy/android/SDLSurfaceView.java
@@ -888,6 +888,8 @@ public boolean onTouchEvent(final MotionEvent event) {
888
int sdlAction = -1;
889
int pointerId = -1;
890
int pointerIndex = -1;
891
+ int[] coords = new int[2];
892
+ this.getLocationInWindow(coords);
893
894
switch ( action ) {
895
case MotionEvent.ACTION_DOWN:
@@ -937,8 +939,8 @@ public boolean onTouchEvent(final MotionEvent event) {
937
939
));
938
940
**/
941
SDLSurfaceView.nativeMouse(
- (int)event.getX(i),
- (int)event.getY(i),
942
+ (int)event.getX(i) - coords[0],
943
+ (int)event.getY(i) - coords[1],
944
sdlAction,
945
event.getPointerId(i),
946
(int)(event.getPressure(i) * 1000.0),
0 commit comments