Synchronize computer-to-device empty clipboard

Set the device clipboard to empty string if necessary. Otherwise, the
current device clipboard will be pasted on Ctrl+v.

PR #2814 <https://github.com/Genymobile/scrcpy/pull/2814>
pull/2814/head
Romain Vimont 3 years ago
parent 0427a981e5
commit ea8028332c

@ -215,11 +215,6 @@ set_device_clipboard(struct controller *controller, bool paste) {
LOGW("Could not get clipboard text: %s", SDL_GetError());
return;
}
if (!*text) {
// empty text
SDL_free(text);
return;
}
char *text_dup = strdup(text);
SDL_free(text);

Loading…
Cancel
Save