mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-06 07:56:07 +00:00
Add contact area and orientation for pen/touch events
This commit is contained in:
@@ -530,9 +530,11 @@ public class NvConnection {
|
||||
}
|
||||
}
|
||||
|
||||
public int sendTouchEvent(byte eventType, int pointerId, float x, float y, float pressure) {
|
||||
public int sendTouchEvent(byte eventType, int pointerId, float x, float y, float pressureOrDistance,
|
||||
float contactAreaMajor, float contactAreaMinor, short rotation) {
|
||||
if (!isMonkey) {
|
||||
return MoonBridge.sendTouchEvent(eventType, pointerId, x, y, pressure);
|
||||
return MoonBridge.sendTouchEvent(eventType, pointerId, x, y, pressureOrDistance,
|
||||
contactAreaMajor, contactAreaMinor, rotation);
|
||||
}
|
||||
else {
|
||||
return MoonBridge.LI_ERR_UNSUPPORTED;
|
||||
@@ -540,9 +542,11 @@ public class NvConnection {
|
||||
}
|
||||
|
||||
public int sendPenEvent(byte eventType, byte toolType, byte penButtons, float x, float y,
|
||||
float pressure, short rotation, byte tilt) {
|
||||
float pressureOrDistance, float contactAreaMajor, float contactAreaMinor,
|
||||
short rotation, byte tilt) {
|
||||
if (!isMonkey) {
|
||||
return MoonBridge.sendPenEvent(eventType, toolType, penButtons, x, y, pressure, rotation, tilt);
|
||||
return MoonBridge.sendPenEvent(eventType, toolType, penButtons, x, y, pressureOrDistance,
|
||||
contactAreaMajor, contactAreaMinor, rotation, tilt);
|
||||
}
|
||||
else {
|
||||
return MoonBridge.LI_ERR_UNSUPPORTED;
|
||||
|
||||
@@ -372,10 +372,12 @@ public class MoonBridge {
|
||||
short leftStickX, short leftStickY,
|
||||
short rightStickX, short rightStickY);
|
||||
|
||||
public static native int sendTouchEvent(byte eventType, int pointerId, float x, float y, float pressure);
|
||||
public static native int sendTouchEvent(byte eventType, int pointerId, float x, float y, float pressure,
|
||||
float contactAreaMajor, float contactAreaMinor, short rotation);
|
||||
|
||||
public static native int sendPenEvent(byte eventType, byte toolType, byte penButtons, float x, float y,
|
||||
float pressure, short rotation, byte tilt);
|
||||
float pressure, float contactAreaMajor, float contactAreaMinor,
|
||||
short rotation, byte tilt);
|
||||
|
||||
public static native int sendControllerArrivalEvent(byte controllerNumber, short activeGamepadMask, byte type, int supportedButtonFlags, short capabilities);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user