mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-16 05:51:42 +00:00
Increase clipboard size from 4k to 256k
Beyond 256k, SDL_GetClipboardText() returns an empty string on my computer. Fixes #1117 <https://github.com/Genymobile/scrcpy/issues/1117>
This commit is contained in:
parent
00d292b2f5
commit
488d22d4e2
4 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ public class ControlMessageReader {
|
|||
static final int SET_SCREEN_POWER_MODE_PAYLOAD_LENGTH = 1;
|
||||
static final int SET_CLIPBOARD_FIXED_PAYLOAD_LENGTH = 1;
|
||||
|
||||
private static final int MESSAGE_MAX_SIZE = 4096;
|
||||
private static final int MESSAGE_MAX_SIZE = 1 << 18; // 256k
|
||||
|
||||
public static final int CLIPBOARD_TEXT_MAX_LENGTH = MESSAGE_MAX_SIZE - 6; // type: 1 byte; paste flag: 1 byte; length: 4 bytes
|
||||
public static final int INJECT_TEXT_MAX_LENGTH = 300;
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.nio.charset.StandardCharsets;
|
|||
|
||||
public class DeviceMessageWriter {
|
||||
|
||||
private static final int MESSAGE_MAX_SIZE = 4096;
|
||||
private static final int MESSAGE_MAX_SIZE = 1 << 18; // 256k
|
||||
public static final int CLIPBOARD_TEXT_MAX_LENGTH = MESSAGE_MAX_SIZE - 5; // type: 1 byte; length: 4 bytes
|
||||
|
||||
private final byte[] rawBuffer = new byte[MESSAGE_MAX_SIZE];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue