Added GetBackgroundColor call to the console struct. Will be used
later.
diff --git a/console/ncurses.c b/console/ncurses.c
index 7cdfd33..8a97a74 100644
--- a/console/ncurses.c
+++ b/console/ncurses.c
@@ -210,7 +210,22 @@
pair = get_color_pair(fg, bg);
- bkgdset(COLOR_PAIR(pair));
+ wbkgd(stdscr, COLOR_PAIR(pair));
+}
+
+void NCURSES_GetBackgroundColor(int *fg, int *bg)
+{
+ chtype background;
+ short pair, sfg, sbg;
+
+ background = getbkgd(stdscr);
+
+ pair = (!A_CHARTEXT & background);
+
+ pair_content(pair, &sfg, &sbg);
+
+ *fg = sfg;
+ *bg = sbg;
}
#ifdef HAVE_RESIZETERM