mirror of https://github.com/cemu-project/Cemu.git
Fix GamePad window when using vulkan with wayland
This commit is contained in:
parent
be1e77186e
commit
b3180bc4a6
|
@ -14,20 +14,15 @@ VulkanCanvas::VulkanCanvas(wxWindow* parent, const wxSize& size, bool is_main_wi
|
||||||
Bind(wxEVT_PAINT, &VulkanCanvas::OnPaint, this);
|
Bind(wxEVT_PAINT, &VulkanCanvas::OnPaint, this);
|
||||||
Bind(wxEVT_SIZE, &VulkanCanvas::OnResize, this);
|
Bind(wxEVT_SIZE, &VulkanCanvas::OnResize, this);
|
||||||
|
|
||||||
if(is_main_window)
|
WindowHandleInfo& canvas = is_main_window ? gui_getWindowInfo().canvas_main : gui_getWindowInfo().canvas_pad;
|
||||||
|
gui_initHandleContextFromWxWidgetsWindow(canvas, this);
|
||||||
|
#if BOOST_OS_LINUX && HAS_WAYLAND
|
||||||
|
if (canvas.backend == WindowHandleInfo::Backend::WAYLAND)
|
||||||
{
|
{
|
||||||
WindowHandleInfo& canvasMain = gui_getWindowInfo().canvas_main;
|
m_subsurface = std::make_unique<wxWlSubsurface>(this);
|
||||||
gui_initHandleContextFromWxWidgetsWindow(canvasMain, this);
|
canvas.surface = m_subsurface->getSurface();
|
||||||
#if BOOST_OS_LINUX && HAS_WAYLAND
|
|
||||||
if(canvasMain.backend == WindowHandleInfo::Backend::WAYLAND)
|
|
||||||
{
|
|
||||||
m_subsurface = std::make_unique<wxWlSubsurface>(this);
|
|
||||||
canvasMain.surface = m_subsurface->getSurface();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
#endif
|
||||||
gui_initHandleContextFromWxWidgetsWindow(gui_getWindowInfo().canvas_pad, this);
|
|
||||||
|
|
||||||
cemu_assert(g_vulkan_available);
|
cemu_assert(g_vulkan_available);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue