diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 707051d5..0c2dc5b3 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -115,6 +115,10 @@ sdl_set_hints(const char *render_driver) { static bool sdl_init_and_configure(bool display, const char *render_driver, bool disable_screensaver) { + if (display) { + sdl_set_hints(render_driver); + } + uint32_t flags = display ? SDL_INIT_VIDEO : SDL_INIT_EVENTS; if (SDL_Init(flags)) { LOGC("Could not initialize SDL: %s", SDL_GetError()); @@ -135,8 +139,6 @@ sdl_init_and_configure(bool display, const char *render_driver, return true; } - sdl_set_hints(render_driver); - if (disable_screensaver) { LOGD("Screensaver disabled"); SDL_DisableScreenSaver();