Standard console height are 25 lines, not just 24.

Now clears the screen and scrolls using the current colors (which allows
for other background colors than black).
console_set_color() no longer allows to set the 8 bit of the background
color which indicates blinking.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9753 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-11-03 02:28:27 +00:00
parent d70ad16601
commit cdd04333a0
1 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ static const uint32 kSerialBaudRate = 115200;
static uint16 *sScreenBase = (uint16 *)0xb8000; static uint16 *sScreenBase = (uint16 *)0xb8000;
static uint32 sScreenWidth = 80; static uint32 sScreenWidth = 80;
static uint32 sScreenHeight = 24; static uint32 sScreenHeight = 25;
static uint32 sScreenOffset = 0; static uint32 sScreenOffset = 0;
static uint16 sColor = 0x0f00; static uint16 sColor = 0x0f00;
@ -133,7 +133,7 @@ scroll_up()
sScreenOffset = (sScreenHeight - 1) * sScreenWidth; sScreenOffset = (sScreenHeight - 1) * sScreenWidth;
for (uint32 i = 0; i < sScreenWidth; i++) for (uint32 i = 0; i < sScreenWidth; i++)
sScreenBase[sScreenOffset + i] = 0x0720; sScreenBase[sScreenOffset + i] = sColor | ' ';
} }
@ -191,7 +191,7 @@ console_clear_screen(void)
return; return;
for (uint32 i = 0; i < sScreenWidth * sScreenHeight; i++) for (uint32 i = 0; i < sScreenWidth * sScreenHeight; i++)
sScreenBase[i] = 0xf20; sScreenBase[i] = sColor;
// reset cursor position as well // reset cursor position as well
sScreenOffset = 0; sScreenOffset = 0;
@ -222,7 +222,7 @@ console_set_cursor(int32 x, int32 y)
void void
console_set_color(int32 foreground, int32 background) console_set_color(int32 foreground, int32 background)
{ {
sColor = (background & 0xf) << 12 | (foreground & 0xf) << 8; sColor = (background & 0x7) << 12 | (foreground & 0xf) << 8;
} }