mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:45:50 +00:00
[FREELDR] Add variable for default text color
On PC/AT-compatible machines it's Gray, and on NEC PC-98 series it's White.
This commit is contained in:
parent
db1b04340f
commit
8a4273b6ee
10 changed files with 30 additions and 17 deletions
|
@ -50,7 +50,10 @@
|
|||
;
|
||||
; Text colors can be any one of the background colors and any of the following:
|
||||
; DarkGray, LightBlue, LightGreen, LightCyan, LightRed, LightMagenta,
|
||||
; Yellow, White.
|
||||
; Yellow, White, Default.
|
||||
;
|
||||
; Default color is the one that is being used by BIOS firmware by default.
|
||||
; On PC/AT-compatible machines it's Gray, and on NEC PC-98 series it's White.
|
||||
|
||||
; [OS-General] Section Commands:
|
||||
;
|
||||
|
|
|
@ -108,6 +108,8 @@ typedef struct
|
|||
} SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
|
||||
#include <poppack.h>
|
||||
|
||||
UCHAR MachDefaultTextColor = COLOR_GRAY;
|
||||
|
||||
static USHORT BiosVideoMode; /* Current video mode as known by BIOS */
|
||||
static ULONG ScreenWidth = 80; /* Screen Width in characters */
|
||||
static ULONG ScreenHeight = 25; /* Screen Height in characters */
|
||||
|
|
|
@ -35,6 +35,8 @@ static BOOLEAN UseCGFont = TRUE;
|
|||
* This option is possible only with BIOS fonts enabled. */
|
||||
static BOOLEAN CGAccelDraw = TRUE;
|
||||
|
||||
UCHAR MachDefaultTextColor = COLOR_WHITE;
|
||||
|
||||
ULONG VramText;
|
||||
static ULONG VramPlaneB;
|
||||
static ULONG VramPlaneG;
|
||||
|
|
|
@ -33,6 +33,8 @@ static ULONG BytesPerPixel;
|
|||
static ULONG Delta;
|
||||
extern multiboot_info_t * MultibootInfoPtr;
|
||||
|
||||
UCHAR MachDefaultTextColor = COLOR_GRAY;
|
||||
|
||||
#define CHAR_WIDTH 8
|
||||
#define CHAR_HEIGHT 16
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define TAG_TAG_TUI_PALETTE 'PiuT'
|
||||
|
||||
PVOID TextVideoBuffer = NULL;
|
||||
extern UCHAR MachDefaultTextColor;
|
||||
|
||||
/*
|
||||
* TuiPrintf()
|
||||
|
@ -724,6 +725,9 @@ UCHAR TuiTextToColor(PCSTR ColorText)
|
|||
};
|
||||
ULONG i;
|
||||
|
||||
if (_stricmp(ColorText, "Default") == 0)
|
||||
return MachDefaultTextColor;
|
||||
|
||||
for (i = 0; i < sizeof(Colors)/sizeof(Colors[0]); ++i)
|
||||
{
|
||||
if (_stricmp(ColorText, Colors[i].ColorName) == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue