mirror of https://github.com/Genymobile/scrcpy
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:
parent
4eb33054cd
commit
5e59ed3135
|
@ -417,10 +417,14 @@ scrcpy(struct scrcpy_options *options) {
|
|||
|
||||
if (options->video_playback) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue