mirror of
https://github.com/Genymobile/scrcpy
synced 2025-01-29 19:52:49 +00:00
Set SDL hints before initialization
In theory, some SDL hints should be initialized before calling SDL_Init().
This commit is contained in:
parent
a57c7d3a2b
commit
ac539e1312
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user