Merge pull request #831 from tomek-brcm/master
Fixes for embedded systems
This commit is contained in:
commit
6180f3d1e9
2 changed files with 10 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
|
||||
cmake_policy(VERSION 2.8)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ ELSEIF(LINUX)
|
|||
endif ()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_WAYLAND_KHR")
|
||||
include_directories(${WAYLAND_INCLUDE_DIR})
|
||||
execute_process(COMMAND ${PKG_CONFIG} --variable=pkgdatadir wayland-protocols OUTPUT_VARIABLE protocol_dir OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
pkg_get_variable(protocol_dir wayland-protocols pkgdatadir)
|
||||
execute_process(COMMAND ${WAYLAND_SCANNER} client-header ${protocol_dir}/stable/xdg-shell/xdg-shell.xml ${CMAKE_BINARY_DIR}/xdg-shell-client-protocol.h
|
||||
COMMAND ${WAYLAND_SCANNER} private-code ${protocol_dir}/stable/xdg-shell/xdg-shell.xml ${CMAKE_BINARY_DIR}/xdg-shell-protocol.c)
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
|
|
|
|||
|
|
@ -842,7 +842,8 @@ VulkanExampleBase::~VulkanExampleBase()
|
|||
wl_keyboard_destroy(keyboard);
|
||||
if (pointer)
|
||||
wl_pointer_destroy(pointer);
|
||||
wl_seat_destroy(seat);
|
||||
if (seat)
|
||||
wl_seat_destroy(seat);
|
||||
xdg_wm_base_destroy(shell);
|
||||
wl_compositor_destroy(compositor);
|
||||
wl_registry_destroy(registry);
|
||||
|
|
@ -2128,12 +2129,17 @@ void VulkanExampleBase::initWaylandConnection()
|
|||
wl_registry_add_listener(registry, ®istry_listener, this);
|
||||
wl_display_dispatch(display);
|
||||
wl_display_roundtrip(display);
|
||||
if (!compositor || !shell || !seat)
|
||||
if (!compositor || !shell)
|
||||
{
|
||||
std::cout << "Could not bind Wayland protocols!\n";
|
||||
fflush(stdout);
|
||||
exit(1);
|
||||
}
|
||||
if (!seat)
|
||||
{
|
||||
std::cout << "WARNING: Input handling not available!\n";
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanExampleBase::setSize(int width, int height)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue