mirror of https://github.com/snes9xgit/snes9x.git
Vulkan: Catch out-of-date exception on swapchain acquire.
This commit is contained in:
parent
67b6d47c09
commit
f7ddc412f9
|
@ -267,7 +267,16 @@ bool Swapchain::begin_frame()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto result_value = device.acquireNextImageKHR(swapchain_object.get(), 33333333, frame.acquire.get());
|
vk::ResultValue<uint32_t> result_value(vk::Result::eSuccess, 0);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result_value = device.acquireNextImageKHR(swapchain_object.get(), 33333333, frame.acquire.get());
|
||||||
|
}
|
||||||
|
catch (vk::OutOfDateKHRError)
|
||||||
|
{
|
||||||
|
result_value.result = vk::Result::eErrorOutOfDateKHR;
|
||||||
|
}
|
||||||
|
|
||||||
if (result_value.result == vk::Result::eErrorOutOfDateKHR ||
|
if (result_value.result == vk::Result::eErrorOutOfDateKHR ||
|
||||||
result_value.result == vk::Result::eSuboptimalKHR)
|
result_value.result == vk::Result::eSuboptimalKHR)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue