SDL: Wayland support

This commit is contained in:
Connor McLaughlin 2020-07-11 03:28:57 +10:00
parent 4ce5f7e802
commit 86c6be41b3

View file

@ -59,6 +59,14 @@ std::optional<WindowInfo> GetWindowInfoForSDLWindow(SDL_Window* window)
break; break;
#endif #endif
#ifdef SDL_VIDEO_DRIVER_WAYLAND
case SDL_SYSWM_WAYLAND:
wi.type = WindowInfo::Type::Wayland;
wi.window_handle = syswm.info.wl.surface;
wi.display_connection = syswm.info.wl.display;
break;
#endif
default: default:
Log_ErrorPrintf("Unhandled syswm subsystem %u", static_cast<u32>(syswm.subsystem)); Log_ErrorPrintf("Unhandled syswm subsystem %u", static_cast<u32>(syswm.subsystem));
return std::nullopt; return std::nullopt;