From: sbkelley Date: Thu, 18 Jun 2026 04:07:44 +0000 (-0400) Subject: Match bg color bits to fg colors now, to save future compatibility headaches X-Git-Tag: 1.6.1-roc-2606C^2~5 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=fa92c85ac3a743e433ff7df9f21bd7c196c6a0fe;p=dgamelaunch Match bg color bits to fg colors now, to save future compatibility headaches --- 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;