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>
This commit is contained in:
Romain Vimont 2021-11-20 17:39:19 +01:00
parent 0427a981e5
commit ea8028332c

View file

@ -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);