diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-12 19:14:56 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-12 19:14:56 +0200 |
commit | 8190adce177a2622550eba65427eb5ce246c4e11 (patch) | |
tree | 2f0a18d5e114fb46721291c2722f6ffb08627d56 /drivers/cga.cc | |
parent | Add serial0 console output (diff) | |
download | kernel.cpp-8190adce177a2622550eba65427eb5ce246c4e11.tar.xz |
CGA: blank last line when scrolling up
Diffstat (limited to 'drivers/cga.cc')
-rw-r--r-- | drivers/cga.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/cga.cc b/drivers/cga.cc index 79facee..961d7e4 100644 --- a/drivers/cga.cc +++ b/drivers/cga.cc @@ -100,6 +100,11 @@ void CGA::write(char c) { buffer[prev] = buffer[idx]; } } + + // blank out last row + for (size_t idx = (max_rows - 1) * max_columns; idx < max_rows * max_columns; ++idx) { + buffer[idx].c = ' '; + } --row; } } |