Merge pull request #7461 from Themaister/master

Vulkan: Keep enable state the same after loading new overlay.
This commit is contained in:
Twinaphex 2018-10-19 00:45:14 +02:00 committed by GitHub
commit 6ad2727835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2619,6 +2619,7 @@ static bool vulkan_overlay_load(void *data,
const void *image_data, unsigned num_images)
{
unsigned i, j;
bool old_enabled;
const struct texture_image *images =
(const struct texture_image*)image_data;
vk_t *vk = (vk_t*)data;
@ -2636,6 +2637,7 @@ static bool vulkan_overlay_load(void *data,
#ifdef HAVE_THREADS
slock_unlock(vk->context->queue_lock);
#endif
old_enabled = vk->overlay.enable;
vulkan_overlay_free(vk);
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.enable = old_enabled;
return true;
error: