mirror of https://github.com/snes9xgit/snes9x.git
Make sure window is visible before creating wayland vulkan context.
This commit is contained in:
parent
3f0f246028
commit
6d71430806
|
@ -94,6 +94,11 @@ void EmuCanvasVulkan::createContext()
|
|||
if (platform == "wayland")
|
||||
{
|
||||
wayland_surface = std::make_unique<WaylandSurface>();
|
||||
if (!main_window->isVisible())
|
||||
{
|
||||
main_window->setVisible(true);
|
||||
QGuiApplication::processEvents();
|
||||
}
|
||||
auto display = (wl_display *)pni->nativeResourceForWindow("display", window);
|
||||
auto surface = (wl_surface *)pni->nativeResourceForWindow("surface", main_window->windowHandle());
|
||||
wayland_surface->attach(display, surface, { parent->x(), parent->y(), width(), height(), static_cast<int>(devicePixelRatio()) });
|
||||
|
|
Loading…
Reference in New Issue