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
1 changed files with 4 additions and 2 deletions
|
@ -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 a new issue