mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-04 10:18:36 +00:00
Common: Add a render_window field to WindowSystemInfo
We need this because we need to pass the layer to MoltenVK, not the view handle. But the input subsystem still needs the window.
This commit is contained in:
parent
bb7623e3ba
commit
86db015c23
8 changed files with 24 additions and 10 deletions
|
@ -162,14 +162,16 @@ static WindowSystemInfo GetWindowSystemInfo(QWindow* window)
|
|||
|
||||
// Our Win32 Qt external doesn't have the private API.
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
wsi.render_surface = window ? reinterpret_cast<void*>(window->winId()) : nullptr;
|
||||
wsi.render_window = window ? reinterpret_cast<void*>(window->winId()) : nullptr;
|
||||
wsi.render_surface = wsi.render_window;
|
||||
#else
|
||||
QPlatformNativeInterface* pni = QGuiApplication::platformNativeInterface();
|
||||
wsi.display_connection = pni->nativeResourceForWindow("display", window);
|
||||
if (wsi.type == WindowSystemType::Wayland)
|
||||
wsi.render_surface = window ? pni->nativeResourceForWindow("surface", window) : nullptr;
|
||||
wsi.render_window = window ? pni->nativeResourceForWindow("surface", window) : nullptr;
|
||||
else
|
||||
wsi.render_surface = window ? reinterpret_cast<void*>(window->winId()) : nullptr;
|
||||
wsi.render_window = window ? reinterpret_cast<void*>(window->winId()) : nullptr;
|
||||
wsi.render_surface = wsi.render_window;
|
||||
#endif
|
||||
wsi.render_surface_scale = window ? static_cast<float>(window->devicePixelRatio()) : 1.0f;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue