mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
rsx: Make X11 optional on Linux
This makes it possible to build rpcs3 on a pure Wayland system, without the Xlib installed.
This commit is contained in:
parent
6dd4003154
commit
e30173a835
9 changed files with 74 additions and 17 deletions
|
@ -26,8 +26,10 @@
|
|||
#include <QGuiApplication>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#endif
|
||||
#ifdef HAVE_X11
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
constexpr auto qstr = QString::fromStdString;
|
||||
|
||||
|
@ -235,7 +237,11 @@ display_handle_t gs_frame::handle() const
|
|||
else
|
||||
{
|
||||
#endif
|
||||
#ifdef HAVE_X11
|
||||
return std::make_pair(XOpenDisplay(0), static_cast<ulong>(this->winId()));
|
||||
#else
|
||||
fmt::throw_exception("Vulkan X11 support disabled at compile-time.");
|
||||
#endif
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue