mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-31 10:01:26 +02:00
Vulkan: Only attempt to create a CAMetalLayer on macOS
This commit is contained in:
parent
9b3b6bea9d
commit
2633b84b98
@ -259,6 +259,10 @@ void VideoBackend::Shutdown()
|
||||
void VideoBackend::PrepareWindow(WindowSystemInfo& wsi)
|
||||
{
|
||||
#if defined(VK_USE_PLATFORM_METAL_EXT)
|
||||
// We only need to manually create the CAMetalLayer on macOS.
|
||||
if (wsi.type != WindowSystemType::MacOS)
|
||||
return;
|
||||
|
||||
// This is kinda messy, but it avoids having to write Objective C++ just to create a metal layer.
|
||||
id view = reinterpret_cast<id>(wsi.render_surface);
|
||||
Class clsCAMetalLayer = objc_getClass("CAMetalLayer");
|
||||
|
Loading…
Reference in New Issue
Block a user