From 78fa3ee09e05ba2c441936a3255c575c3e3516ab Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Tue, 3 Dec 2024 20:42:54 +0100 Subject: [PATCH] vulkan: delay updating imgui texture when driver has just been reset Fixes crash when selecting a custom gamepad layout .png (android) --- core/rend/vulkan/vulkan_driver.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/rend/vulkan/vulkan_driver.h b/core/rend/vulkan/vulkan_driver.h index ea224139e7..e483592894 100644 --- a/core/rend/vulkan/vulkan_driver.h +++ b/core/rend/vulkan/vulkan_driver.h @@ -88,6 +88,9 @@ class VulkanDriver final : public ImGuiDriver ImTextureID updateTexture(const std::string& name, const u8 *data, int width, int height, bool nearestSampling) override { + if (justStarted) + // give it some more time + return {}; VkTexture vkTex(std::make_unique()); vkTex.texture->tex_type = TextureType::_8888; vkTex.texture->SetCommandBuffer(getCommandBuffer());