提交 1a5c19ec 编写于 作者: S Simon Fels

sdl: take native window and display for wayland from SDL

上级 00a809b1
......@@ -76,6 +76,8 @@ pkg_check_modules(LIBSYSTEMD libsystemd REQUIRED)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMIR_SUPPORT")
# endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMESA_EGL_NO_X11_HEADERS")
#####################################################################
# Enable code coverage calculation with gcov/gcovr/lcov
# Usage:
......
......@@ -83,6 +83,10 @@ Window::Window(const std::shared_ptr<Renderer> &renderer,
native_display_ = static_cast<EGLNativeDisplayType>(info.info.x11.display);
native_window_ = static_cast<EGLNativeWindowType>(info.info.x11.window);
break;
case SDL_SYSWM_WAYLAND:
native_display_ = static_cast<EGLNativeDisplayType>(info.info.wl.display);
native_window_ = reinterpret_cast<EGLNativeWindowType>(info.info.wl.surface);
break;
#if defined(MIR_SUPPORT)
case SDL_SYSWM_MIR: {
native_display_ = static_cast<EGLNativeDisplayType>(mir_connection_get_egl_native_display(info.info.mir.connection));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册