mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 21:44:20 +01:00
Fix expected message length for touch events
The expected length for a touch event control message was incorrect. As a consequence, a BufferUnderflowException could occur. Fixes #1245 <https://github.com/Genymobile/scrcpy/issues/1245>
This commit is contained in:
@@ -9,7 +9,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
public class ControlMessageReader {
|
public class ControlMessageReader {
|
||||||
|
|
||||||
private static final int INJECT_KEYCODE_PAYLOAD_LENGTH = 9;
|
private static final int INJECT_KEYCODE_PAYLOAD_LENGTH = 9;
|
||||||
private static final int INJECT_TOUCH_EVENT_PAYLOAD_LENGTH = 21;
|
private static final int INJECT_TOUCH_EVENT_PAYLOAD_LENGTH = 27;
|
||||||
private static final int INJECT_SCROLL_EVENT_PAYLOAD_LENGTH = 20;
|
private static final int INJECT_SCROLL_EVENT_PAYLOAD_LENGTH = 20;
|
||||||
private static final int SET_SCREEN_POWER_MODE_PAYLOAD_LENGTH = 1;
|
private static final int SET_SCREEN_POWER_MODE_PAYLOAD_LENGTH = 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user