mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
Keep enable state the same after loading new overlay.
This commit is contained in:
parent
ad87112cfc
commit
66e7c73193
@ -2619,6 +2619,7 @@ static bool vulkan_overlay_load(void *data,
|
|||||||
const void *image_data, unsigned num_images)
|
const void *image_data, unsigned num_images)
|
||||||
{
|
{
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
|
bool old_enabled;
|
||||||
const struct texture_image *images =
|
const struct texture_image *images =
|
||||||
(const struct texture_image*)image_data;
|
(const struct texture_image*)image_data;
|
||||||
vk_t *vk = (vk_t*)data;
|
vk_t *vk = (vk_t*)data;
|
||||||
@ -2636,6 +2637,7 @@ static bool vulkan_overlay_load(void *data,
|
|||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
slock_unlock(vk->context->queue_lock);
|
slock_unlock(vk->context->queue_lock);
|
||||||
#endif
|
#endif
|
||||||
|
old_enabled = vk->overlay.enable;
|
||||||
vulkan_overlay_free(vk);
|
vulkan_overlay_free(vk);
|
||||||
|
|
||||||
vk->overlay.images = (struct vk_texture*)
|
vk->overlay.images = (struct vk_texture*)
|
||||||
@ -2663,6 +2665,7 @@ static bool vulkan_overlay_load(void *data,
|
|||||||
vk->overlay.vertex[4 * i + j].color = white;
|
vk->overlay.vertex[4 * i + j].color = white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vk->overlay.enable = old_enabled;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user