Skip to content

Commit

Permalink
vulkan: delay updating imgui texture when driver has just been reset
Browse files Browse the repository at this point in the history
Fixes crash when selecting a custom gamepad layout .png (android)
  • Loading branch information
flyinghead committed Dec 3, 2024
1 parent de1584d commit 78fa3ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/rend/vulkan/vulkan_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Texture>());
vkTex.texture->tex_type = TextureType::_8888;
vkTex.texture->SetCommandBuffer(getCommandBuffer());
Expand Down

0 comments on commit 78fa3ee

Please sign in to comment.