mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-04-29 05:31:47 +00:00
QOL: automatically enable native wayland if supported display is found
This commit is contained in:
parent
54997438de
commit
d79fab24b1
1 changed files with 4 additions and 0 deletions
|
|
@ -67,6 +67,10 @@ ultramodern::gfx_callbacks_t::gfx_data_t create_gfx() {
|
|||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
|
||||
if (getenv("WAYLAND_DISPLAY") != NULL) {
|
||||
SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland");
|
||||
}
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) > 0) {
|
||||
exit_error("Failed to initialize SDL2: %s\n", SDL_GetError());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue