diff options
| author | 2023-06-30 23:35:36 -0700 | |
|---|---|---|
| committer | 2023-07-01 14:15:26 -0700 | |
| commit | aa89ec921481696c976dd1ca6687721c98e0b2d7 (patch) | |
| tree | 9d489207e1f53788635e868c84f1cf7d43e30467 /src | |
| parent | vulkan: Use newer VK_EXT_metal_surface to create surface for MoltenVK. (diff) | |
| download | yuzu-aa89ec921481696c976dd1ca6687721c98e0b2d7.tar.gz yuzu-aa89ec921481696c976dd1ca6687721c98e0b2d7.tar.xz yuzu-aa89ec921481696c976dd1ca6687721c98e0b2d7.zip | |
yuzu: Use test window with VulkanSurface to check for present modes.
It is probably not correct to create a surface on a non-VulkanSurface window.
On macOS this causes a preferences crash due to missing CAMetalLayer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/vk_device_info.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/yuzu/vk_device_info.cpp b/src/yuzu/vk_device_info.cpp index 7c26a3dc7..e1a0e6a2a 100644 --- a/src/yuzu/vk_device_info.cpp +++ b/src/yuzu/vk_device_info.cpp | |||
| @@ -26,7 +26,10 @@ Record::~Record() = default; | |||
| 26 | void PopulateRecords(std::vector<Record>& records, QWindow* window) try { | 26 | void PopulateRecords(std::vector<Record>& records, QWindow* window) try { |
| 27 | using namespace Vulkan; | 27 | using namespace Vulkan; |
| 28 | 28 | ||
| 29 | auto wsi = QtCommon::GetWindowSystemInfo(window); | 29 | // Create a test window with a Vulkan surface type for checking present modes. |
| 30 | QWindow test_window(window); | ||
| 31 | test_window.setSurfaceType(QWindow::VulkanSurface); | ||
| 32 | auto wsi = QtCommon::GetWindowSystemInfo(&test_window); | ||
| 30 | 33 | ||
| 31 | vk::InstanceDispatch dld; | 34 | vk::InstanceDispatch dld; |
| 32 | const auto library = OpenLibrary(); | 35 | const auto library = OpenLibrary(); |