diff --git a/src/main/main.cpp b/src/main/main.cpp index fbc5196..b2d2026 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -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()); }