diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index d62a5f520f..0b0b8badd4 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -419,12 +419,16 @@ scrcpy(struct scrcpy_options *options) { sdl_set_hints(options->render_driver); } - // Initialize the video subsystem even if --no-video or --no-video-playback - // is passed so that clipboard synchronization still works. - // - if (SDL_Init(SDL_INIT_VIDEO)) { - LOGE("Could not initialize SDL video: %s", SDL_GetError()); - goto end; + if (options->video_playback || + (options->control && options->clipboard_autosync)) { + // Initialize the video subsystem even if --no-video or + // --no-video-playback is passed so that clipboard synchronization + // still works. + // + if (SDL_Init(SDL_INIT_VIDEO)) { + LOGE("Could not initialize SDL video: %s", SDL_GetError()); + goto end; + } } if (options->audio_playback) {