From e7b5673644568723522b8ffe7db922a3e07ad091 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Sat, 3 Feb 2024 00:08:10 +0100 Subject: [PATCH] uwp again --- .../win32_dpi_awareness.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/hello_imgui/internal/backend_impls/backend_window_helper/win32_dpi_awareness.cpp b/src/hello_imgui/internal/backend_impls/backend_window_helper/win32_dpi_awareness.cpp index 0c15f310..8aee6cc8 100644 --- a/src/hello_imgui/internal/backend_impls/backend_window_helper/win32_dpi_awareness.cpp +++ b/src/hello_imgui/internal/backend_impls/backend_window_helper/win32_dpi_awareness.cpp @@ -1,16 +1,10 @@ #ifdef _WIN32 +#include #if WINAPI_FAMILY == WINAPI_FAMILY_APP #define UWP_DISABLE_DPI_AWARENESS #endif -#ifdef UWP_DISABLE_DPI_AWARENESS - #include - void ImGui_ImplWin32_EnableDpiAwareness() - { - fprintf(stderr, "ImGui_ImplWin32_EnableDpiAwareness not implemented for __cplusplus_winrt, aka uwp\n"); - } -#else // UWP_DISABLE_DPI_AWARENESS // Adapted from imgui/backends/imgui_impl_win32.cpp #include "imgui.h" @@ -24,6 +18,13 @@ namespace HelloImGui { namespace Internal { + #ifdef UWP_DISABLE_DPI_AWARENESS + void ImGui_ImplWin32_EnableDpiAwareness() + { + fprintf(stderr, "ImGui_ImplWin32_EnableDpiAwareness not implemented for __cplusplus_winrt, aka uwp\n"); + } + #else // UWP_DISABLE_DPI_AWARENESS + //-------------------------------------------------------------------------------------------------------- // DPI-related helpers (optional) @@ -179,9 +180,10 @@ namespace Internal return ImGui_ImplWin32_GetDpiScaleForMonitor(monitor); } + #endif // UWP_DISABLE_DPI_AWARENESS + } // namespace Internal } // namespace HelloImGui -#endif // UWP_DISABLE_DPI_AWARENESS #endif // #ifdef _WIN32