forked from Bananymous/banan-os
Kernel: Debug temporary debug print just to beginning when full
This commit is contained in:
parent
f842a9255f
commit
1d61bccfc3
|
@ -74,6 +74,8 @@ namespace Debug
|
||||||
static uint32_t col = 0;
|
static uint32_t col = 0;
|
||||||
static uint32_t row = 0;
|
static uint32_t row = 0;
|
||||||
|
|
||||||
|
uint32_t row_copy = row;
|
||||||
|
|
||||||
if (ch == '\n')
|
if (ch == '\n')
|
||||||
{
|
{
|
||||||
row++;
|
row++;
|
||||||
|
@ -96,6 +98,19 @@ namespace Debug
|
||||||
col = 0;
|
col = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (row >= g_terminal_driver->height())
|
||||||
|
row = 0;
|
||||||
|
|
||||||
|
if (row != row_copy)
|
||||||
|
{
|
||||||
|
for (uint32_t i = col; i < g_terminal_driver->width(); i++)
|
||||||
|
{
|
||||||
|
g_terminal_driver->putchar_at(' ', i, row, TerminalColor::BRIGHT_WHITE, TerminalColor::BLACK);
|
||||||
|
if (row + 1 < g_terminal_driver->height())
|
||||||
|
g_terminal_driver->putchar_at(' ', i, row + 1, TerminalColor::BRIGHT_WHITE, TerminalColor::BLACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue