made rasops_allocattr_color() respect WS_DEFAULT_FG and WS_DEFAULT_BG instead of using white on black
This commit is contained in:
parent
c10404e844
commit
80ef75e061
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rasops.c,v 1.46 2005/02/27 00:27:47 perry Exp $ */
|
||||
/* $NetBSD: rasops.c,v 1.47 2005/05/01 23:19:01 macallan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -37,10 +37,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.46 2005/02/27 00:27:47 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.47 2005/05/01 23:19:01 macallan Exp $");
|
||||
|
||||
#include "opt_rasops.h"
|
||||
#include "rasops_glue.h"
|
||||
#include "opt_wsmsgattrs.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -397,8 +398,16 @@ rasops_allocattr_color(cookie, fg, bg, flg, attr)
|
|||
return (EINVAL);
|
||||
|
||||
if ((flg & WSATTR_WSCOLORS) == 0) {
|
||||
fg = WSCOL_WHITE;
|
||||
bg = WSCOL_BLACK;
|
||||
#ifdef WS_DEFAULT_FG
|
||||
fg = WS_DEFAULT_FG;
|
||||
#else
|
||||
fg = WSCOL_WHITE;
|
||||
#endif
|
||||
#ifdef WS_DEFAULT_BG
|
||||
bg = WS_DEFAULT_BG;
|
||||
#else
|
||||
bg = WSCOL_BLACK;
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((flg & WSATTR_REVERSE) != 0) {
|
||||
|
|
Loading…
Reference in New Issue