Skip to content

Commit

Permalink
uwp again
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Feb 2, 2024
1 parent 5ccd557 commit e7b5673
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#ifdef _WIN32
#include <cstdio>

#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 // UWP_DISABLE_DPI_AWARENESS

// Adapted from imgui/backends/imgui_impl_win32.cpp
#include "imgui.h"
Expand All @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit e7b5673

Please sign in to comment.