From 9eb5ff6136f6f0481c2c8fb84eeb03908a0332cc Mon Sep 17 00:00:00 2001 From: Rozelette Date: Thu, 12 May 2022 08:06:39 -0500 Subject: [PATCH] Fix GetTextureByID not returning anything on non-DX11 (#297) --- libultraship/libultraship/SohImGuiImpl.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 0fbba2b75..e5d51a5a1 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -932,13 +932,12 @@ namespace SohImGui { ImTextureID GetTextureByID(int id) { #ifdef ENABLE_DX11 - if (impl.backend == Backend::DX11) - { - ImTextureID gfx_d3d11_get_texture_by_id(int id); - return gfx_d3d11_get_texture_by_id(id); - } -#else - return reinterpret_cast(id); + if (impl.backend == Backend::DX11) + { + ImTextureID gfx_d3d11_get_texture_by_id(int id); + return gfx_d3d11_get_texture_by_id(id); + } #endif + return reinterpret_cast(id); } }