From eb9b52f648d2d7daf1d491e613318190f16b32ab Mon Sep 17 00:00:00 2001 From: Link4Electronics Date: Sat, 8 Mar 2025 00:08:39 -0300 Subject: [PATCH] Update imconfig.h for big endian --- neo/libs/imgui/imconfig.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/neo/libs/imgui/imconfig.h b/neo/libs/imgui/imconfig.h index 8f8bc3b9..c87fc2f8 100644 --- a/neo/libs/imgui/imconfig.h +++ b/neo/libs/imgui/imconfig.h @@ -140,3 +140,13 @@ namespace ImGui void MyFunction(const char* name, MyMatrix44* mtx); } */ + +// DG: on Big Endian systems the order of color channels in an uint32 color is inverted. +// this seems to be the official way to support Big Endian platforms in ImGUI: +#if D3_IS_BIG_ENDIAN + #define IM_COL32_R_SHIFT 24 + #define IM_COL32_G_SHIFT 16 + #define IM_COL32_B_SHIFT 8 + #define IM_COL32_A_SHIFT 0 + #define IM_COL32_A_MASK 0x000000FF +#endif