mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-02 07:45:40 +00:00
Pull in updated moonlight-common-c pen/touch APIs
This commit is contained in:
parent
a2e628f3f8
commit
6bf9c31860
@ -537,9 +537,9 @@ public class NvConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int sendPenEvent(byte eventType, byte toolType, byte penButtons, float x, float y,
|
public int sendPenEvent(byte eventType, byte toolType, byte penButtons, float x, float y,
|
||||||
float pressure, short rotation, byte tiltX, byte tiltY) {
|
float pressure, short rotation, byte tilt) {
|
||||||
if (!isMonkey) {
|
if (!isMonkey) {
|
||||||
return MoonBridge.sendPenEvent(eventType, toolType, penButtons, x, y, pressure, rotation, tiltX, tiltY);
|
return MoonBridge.sendPenEvent(eventType, toolType, penButtons, x, y, pressure, rotation, tilt);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return MoonBridge.LI_ERR_UNSUPPORTED;
|
return MoonBridge.LI_ERR_UNSUPPORTED;
|
||||||
|
@ -77,11 +77,12 @@ public class MoonBridge {
|
|||||||
|
|
||||||
public static final int LI_ERR_UNSUPPORTED = -5501;
|
public static final int LI_ERR_UNSUPPORTED = -5501;
|
||||||
|
|
||||||
public static final byte LI_TOUCH_EVENT_HOVER = 0x00;
|
public static final byte LI_TOUCH_EVENT_HOVER = 0x00;
|
||||||
public static final byte LI_TOUCH_EVENT_DOWN = 0x01;
|
public static final byte LI_TOUCH_EVENT_DOWN = 0x01;
|
||||||
public static final byte LI_TOUCH_EVENT_UP = 0x02;
|
public static final byte LI_TOUCH_EVENT_UP = 0x02;
|
||||||
public static final byte LI_TOUCH_EVENT_MOVE = 0x03;
|
public static final byte LI_TOUCH_EVENT_MOVE = 0x03;
|
||||||
public static final byte LI_TOUCH_EVENT_CANCEL = 0x04;
|
public static final byte LI_TOUCH_EVENT_CANCEL = 0x04;
|
||||||
|
public static final byte LI_TOUCH_EVENT_BUTTON_ONLY = 0x05;
|
||||||
|
|
||||||
public static final byte LI_TOOL_TYPE_PEN = 0x01;
|
public static final byte LI_TOOL_TYPE_PEN = 0x01;
|
||||||
public static final byte LI_TOOL_TYPE_ERASER = 0x02;
|
public static final byte LI_TOOL_TYPE_ERASER = 0x02;
|
||||||
@ -91,7 +92,7 @@ public class MoonBridge {
|
|||||||
public static final byte LI_PEN_BUTTON_TERTIARY = 0x04;
|
public static final byte LI_PEN_BUTTON_TERTIARY = 0x04;
|
||||||
|
|
||||||
public static final byte LI_TILT_UNKNOWN = (byte)0xFF;
|
public static final byte LI_TILT_UNKNOWN = (byte)0xFF;
|
||||||
public static final byte LI_ROT_UNKNOWN = (byte)0xFF;
|
public static final short LI_ROT_UNKNOWN = (short)0xFFFF;
|
||||||
|
|
||||||
public static final byte LI_CTYPE_UNKNOWN = 0x00;
|
public static final byte LI_CTYPE_UNKNOWN = 0x00;
|
||||||
public static final byte LI_CTYPE_XBOX = 0x01;
|
public static final byte LI_CTYPE_XBOX = 0x01;
|
||||||
@ -350,7 +351,7 @@ public class MoonBridge {
|
|||||||
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);
|
||||||
|
|
||||||
public static native int sendPenEvent(byte eventType, byte toolType, byte penButtons, float x, float y,
|
public static native int sendPenEvent(byte eventType, byte toolType, byte penButtons, float x, float y,
|
||||||
float pressure, short rotation, byte tiltX, byte tiltY);
|
float pressure, short rotation, byte tilt);
|
||||||
|
|
||||||
public static native int sendControllerArrivalEvent(byte controllerNumber, short activeGamepadMask, byte type, int supportedButtonFlags, short capabilities);
|
public static native int sendControllerArrivalEvent(byte controllerNumber, short activeGamepadMask, byte type, int supportedButtonFlags, short capabilities);
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 5cbb6f210d40d2af55e619526a4fc4a33df72c15
|
Subproject commit c8aac7f71cc0a94f3edbc2fad27a0915cad6fa16
|
@ -49,9 +49,8 @@ JNIEXPORT jint JNICALL
|
|||||||
Java_com_limelight_nvstream_jni_MoonBridge_sendPenEvent(JNIEnv *env, jclass clazz, jbyte eventType,
|
Java_com_limelight_nvstream_jni_MoonBridge_sendPenEvent(JNIEnv *env, jclass clazz, jbyte eventType,
|
||||||
jbyte toolType, jbyte penButtons,
|
jbyte toolType, jbyte penButtons,
|
||||||
jfloat x, jfloat y, jfloat pressure,
|
jfloat x, jfloat y, jfloat pressure,
|
||||||
jshort rotation, jbyte tiltX,
|
jshort rotation, jbyte tilt) {
|
||||||
jbyte tiltY) {
|
return LiSendPenEvent(eventType, toolType, penButtons, x, y, pressure, rotation, tilt);
|
||||||
return LiSendPenEvent(eventType, toolType, penButtons, x, y, pressure, rotation, tiltX, tiltY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL
|
JNIEXPORT jint JNICALL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user