Skip to content

Commit

Permalink
if uwp, no ImGui_ImplWin32_EnableDpiAwareness()
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Feb 2, 2024
1 parent 01e3bdc commit aab809f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#ifdef _WIN32

#ifdef __cplusplus_winrt
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#define UWP_DISABLE_DPI_AWARENESS
#endif

#ifdef UWP_DISABLE_DPI_AWARENESS
#include <cstdio>
void ImGui_ImplWin32_EnableDpiAwareness()
{
fprintf(stderr, "ImGui_ImplWin32_EnableDpiAwareness not implemented for __cplusplus_winrt, aka uwp\n");
}
#else // __cplusplus_winrt
#else // UWP_DISABLE_DPI_AWARENESS

// Adapted from imgui/backends/imgui_impl_win32.cpp
#include "imgui.h"
Expand Down Expand Up @@ -178,6 +182,6 @@ namespace Internal
} // namespace Internal
} // namespace HelloImGui

#endif // __cplusplus_winrt
#endif // UWP_DISABLE_DPI_AWARENESS

#endif // #ifdef _WIN32

0 comments on commit aab809f

Please sign in to comment.