Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9497f39fb4 | ||
|
|
bf056b1fee |
@@ -419,12 +419,21 @@ scrcpy(struct scrcpy_options *options) {
|
|||||||
sdl_set_hints(options->render_driver);
|
sdl_set_hints(options->render_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the video subsystem even if --no-video or --no-video-playback
|
if (options->video_playback ||
|
||||||
// is passed so that clipboard synchronization still works.
|
(options->control && options->clipboard_autosync)) {
|
||||||
// <https://github.com/Genymobile/scrcpy/issues/4418>
|
// Initialize the video subsystem even if --no-video or
|
||||||
if (SDL_Init(SDL_INIT_VIDEO)) {
|
// --no-video-playback is passed so that clipboard synchronization
|
||||||
LOGE("Could not initialize SDL video: %s", SDL_GetError());
|
// still works.
|
||||||
goto end;
|
// <https://github.com/Genymobile/scrcpy/issues/4418>
|
||||||
|
if (SDL_Init(SDL_INIT_VIDEO)) {
|
||||||
|
// If it fails, it is an error only if video playback is enabled
|
||||||
|
if (options->video_playback) {
|
||||||
|
LOGE("Could not initialize SDL video: %s", SDL_GetError());
|
||||||
|
goto end;
|
||||||
|
} else {
|
||||||
|
LOGW("Could not initialize SDL video: %s", SDL_GetError());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->audio_playback) {
|
if (options->audio_playback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user