Skip to content

Commit 8d090a7

Browse files
committed
for Linux, prefer wayland to x11
1 parent 5107841 commit 8d090a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/graphics/GraphicsInitializer.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ namespace gf {
3232
if (!g_graphics_loaded.exchange(true)) { // we are the first
3333
// initialize SDL
3434

35+
#ifdef SDL_PLATFORM_LINUX
36+
SDL_SetHint(SDL_HINT_VIDEO_DRIVER, "wayland,x11");
37+
#endif
38+
3539
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD)) {
3640
Log::error("Unable to initialize SDL: '{}'", SDL_GetError());
3741
return;

0 commit comments

Comments
 (0)