From e5c33a5d0cf6e22c49d7b13450a959575c0611bc Mon Sep 17 00:00:00 2001 From: rozlette Date: Wed, 11 May 2022 18:07:18 -0500 Subject: [PATCH] Fix GetTextureByID not returning anything on non-DX11 --- 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 9adbdd820..30514656e 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -921,13 +921,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); } }