mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Avoid hard crash when capturing screenshot in emulating mailbox. (#13315)
The emulating mailbox infrastructure is very hacky and needs a rethink to be able to properly support screenshots. emulating mailbox is pretty nasty to begin with and should be considered a hack.
This commit is contained in:
parent
4a39630c0f
commit
ce8a3db4dc
@ -2743,6 +2743,12 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer, bool is_idle)
|
|||||||
slock_unlock(vk->context->queue_lock);
|
slock_unlock(vk->context->queue_lock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!staging->memory)
|
||||||
|
{
|
||||||
|
RARCH_ERR("[Vulkan]: Attempted to readback synchronously, but no image is present.\nThis can happen if vsync is disabled on Windows systems due to mailbox emulation.\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!staging->mapped)
|
if (!staging->mapped)
|
||||||
{
|
{
|
||||||
VK_MAP_PERSISTENT_TEXTURE(vk->context->device, staging);
|
VK_MAP_PERSISTENT_TEXTURE(vk->context->device, staging);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user