mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
VideoBackends: Make it possible for PrepareWindow to change the surface
Again, needed for MoltenVK.
This commit is contained in:
parent
86db015c23
commit
a545344268
@ -233,12 +233,13 @@ bool Init(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
Host_UpdateMainFrame(); // Disable any menus or buttons at boot
|
||||
|
||||
// Issue any API calls which must occur on the main thread for the graphics backend.
|
||||
g_video_backend->PrepareWindow(wsi);
|
||||
WindowSystemInfo prepared_wsi(wsi);
|
||||
g_video_backend->PrepareWindow(prepared_wsi);
|
||||
|
||||
// Start the emu thread
|
||||
s_done_booting.Reset();
|
||||
s_is_booting.Set();
|
||||
s_emu_thread = std::thread(EmuThread, std::move(boot), wsi);
|
||||
s_emu_thread = std::thread(EmuThread, std::move(boot), prepared_wsi);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,6 @@ public:
|
||||
std::string GetName() const override { return "Vulkan"; }
|
||||
std::string GetDisplayName() const override { return _trans("Vulkan"); }
|
||||
void InitBackendInfo() override;
|
||||
void PrepareWindow(const WindowSystemInfo& wsi) override;
|
||||
void PrepareWindow(WindowSystemInfo& wsi) override;
|
||||
};
|
||||
} // namespace Vulkan
|
||||
|
@ -304,7 +304,7 @@ static bool IsRunningOnMojaveOrHigher()
|
||||
}
|
||||
#endif
|
||||
|
||||
void VideoBackend::PrepareWindow(const WindowSystemInfo& wsi)
|
||||
void VideoBackend::PrepareWindow(WindowSystemInfo& wsi)
|
||||
{
|
||||
#if defined(VK_USE_PLATFORM_MACOS_MVK)
|
||||
// This is kinda messy, but it avoids having to write Objective C++ just to create a metal layer.
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
|
||||
// Prepares a native window for rendering. This is called on the main thread, or the
|
||||
// thread which owns the window.
|
||||
virtual void PrepareWindow(const WindowSystemInfo& wsi) {}
|
||||
virtual void PrepareWindow(WindowSystemInfo& wsi) {}
|
||||
|
||||
static std::string BadShaderFilename(const char* shader_stage, int counter);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user