From fa92c85ac3a743e433ff7df9f21bd7c196c6a0fe Mon Sep 17 00:00:00 2001 From: sbkelley Date: Thu, 18 Jun 2026 00:07:44 -0400 Subject: [PATCH] Match bg color bits to fg colors now, to save future compatibility headaches --- dgamelaunch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 8e46116..27babad 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1928,7 +1928,7 @@ initcurses () int color_pair_idx(int fg, int bg) { - int bgbits = (7 & bg) << 4; + int bgbits = (((1 & bg) << 2) | (2 & bg) | ((4 & bg) >> 2)) << 4; /* Swap bits 1 and 3 to line up with original color remap (+1) */ int fgbits = (8 & fg) | ((1 & fg) << 2) | (2 & fg) | ((4 & fg) >> 2); return (bgbits | fgbits) + 1; -- 2.47.3