Always initialize SDL with the video subsystem
Clipboard synchronization requires SDL_INIT_VIDEO, so always initialize
the video subsystem, even if --no-video or --no-video-playback is
passed.
Refs caf594c90e
Fixes #4418 <https://github.com/Genymobile/scrcpy/issues/4418>
This commit is contained in:
@@ -417,10 +417,14 @@ scrcpy(struct scrcpy_options *options) {
|
|||||||
|
|
||||||
if (options->video_playback) {
|
if (options->video_playback) {
|
||||||
sdl_set_hints(options->render_driver);
|
sdl_set_hints(options->render_driver);
|
||||||
if (SDL_Init(SDL_INIT_VIDEO)) {
|
}
|
||||||
LOGE("Could not initialize SDL video: %s", SDL_GetError());
|
|
||||||
goto end;
|
// Initialize the video subsystem even if --no-video or --no-video-playback
|
||||||
}
|
// is passed so that clipboard synchronization still works.
|
||||||
|
// <https://github.com/Genymobile/scrcpy/issues/4418>
|
||||||
|
if (SDL_Init(SDL_INIT_VIDEO)) {
|
||||||
|
LOGE("Could not initialize SDL video: %s", SDL_GetError());
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->audio_playback) {
|
if (options->audio_playback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user