Merge pull request #830 from morphis/add-wayland-support
sdl: take native window and display for wayland from SDL
This commit is contained in:
commit
a9621db187
2 changed files with 6 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue