From d7cedd648b0a6809c62d3d363efb2fe08dca00eb Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 23 Sep 2024 14:03:36 +0200 Subject: [PATCH] Backends: SDL2, SDL3: Fixed building for UWP platforms. (#8008) --- backends/imgui_impl_sdl2.cpp | 2 +- backends/imgui_impl_sdl3.cpp | 2 +- docs/CHANGELOG.txt | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backends/imgui_impl_sdl2.cpp b/backends/imgui_impl_sdl2.cpp index 9ac3f809b..06e48d56f 100644 --- a/backends/imgui_impl_sdl2.cpp +++ b/backends/imgui_impl_sdl2.cpp @@ -1037,7 +1037,7 @@ static void ImGui_ImplSDL2_DestroyWindow(ImGuiViewport* viewport) static void ImGui_ImplSDL2_ShowWindow(ImGuiViewport* viewport) { ImGui_ImplSDL2_ViewportData* vd = (ImGui_ImplSDL2_ViewportData*)viewport->PlatformUserData; -#if defined(_WIN32) +#if defined(_WIN32) && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_GAMES)) HWND hwnd = (HWND)viewport->PlatformHandleRaw; // SDL hack: Hide icon from task bar diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index 8000cdf44..9558d0af5 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -989,7 +989,7 @@ static void ImGui_ImplSDL3_DestroyWindow(ImGuiViewport* viewport) static void ImGui_ImplSDL3_ShowWindow(ImGuiViewport* viewport) { ImGui_ImplSDL3_ViewportData* vd = (ImGui_ImplSDL3_ViewportData*)viewport->PlatformUserData; -#if defined(_WIN32) +#if defined(_WIN32) && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_GAMES)) HWND hwnd = (HWND)viewport->PlatformHandleRaw; // SDL hack: Show icon in task bar (#7989) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 9a6261b25..0eada957a 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -50,6 +50,8 @@ Other changes: Docking+Viewports Branch: +- Backends: SDL2, SDL3: Fixed building for UWP platforms. (#8008) + ----------------------------------------------------------------------- VERSION 1.91.2 (Released 2024-09-19)