Kernel: TTY now handles keeping terminal buffer
VESA Driver cannot scroll anymore, this is handled by tty
This commit is contained in:
@@ -19,13 +19,19 @@ private:
|
||||
void ResetAnsiEscape();
|
||||
void HandleAnsiSGR();
|
||||
void HandleAnsiEscape(uint16_t ch);
|
||||
void PutCharAt(uint16_t ch, size_t x, size_t y);
|
||||
inline void RenderFromBuffer(size_t x, size_t y)
|
||||
{
|
||||
const auto& cell = m_buffer[y * m_width + x];
|
||||
VESA::PutEntryAt(cell.character, x, y, cell.foreground, cell.background);
|
||||
}
|
||||
|
||||
private:
|
||||
struct Cell
|
||||
{
|
||||
VESA::Color foreground = VESA::Color::BRIGHT_WHITE;
|
||||
VESA::Color background = VESA::Color::BLACK;
|
||||
uint8_t character = ' ';
|
||||
uint16_t character = ' ';
|
||||
};
|
||||
|
||||
struct AnsiState
|
||||
@@ -39,7 +45,7 @@ private:
|
||||
uint32_t m_height { 0 };
|
||||
uint32_t m_row { 0 };
|
||||
uint32_t m_column { 0 };
|
||||
VESA::Color m_foreground { VESA::Color::BRIGHT_WHITE};
|
||||
VESA::Color m_foreground { VESA::Color::BRIGHT_WHITE };
|
||||
VESA::Color m_background { VESA::Color::BLACK };
|
||||
Cell* m_buffer { nullptr };
|
||||
AnsiState m_ansi_state;
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace VESA
|
||||
bool Initialize();
|
||||
void PutEntryAt(uint16_t, uint32_t, uint32_t, Color, Color);
|
||||
void Clear(Color);
|
||||
void Scroll();
|
||||
|
||||
uint32_t GetTerminalWidth();
|
||||
uint32_t GetTerminalHeight();
|
||||
|
||||
Reference in New Issue
Block a user