mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-25 22:14:34 +00:00
fix(kernel/tty): wrong calculation of cell index
Instead of ws_row, now it's ws_col.
This commit is contained in:
parent
abb7899a9d
commit
7902726239
@ -123,7 +123,8 @@ namespace KernelConsole
|
||||
|
||||
ConsoleTerminal *term = CurrentTerminal.load();
|
||||
ConsoleTerminal::Blinker &blinker = term->Blink;
|
||||
TerminalCell *cell = term->Term->GetCell(Renderer.Cursor.X + Renderer.Cursor.Y * term->Term->GetWinsize()->ws_row);
|
||||
size_t cellIndex = Renderer.Cursor.Y * term->Term->GetWinsize()->ws_col + Renderer.Cursor.X;
|
||||
TerminalCell *cell = term->Term->GetCell(cellIndex);
|
||||
uint32_t bgColor = cell->attr.Bright ? TermBrightColors[cell->attr.Background] : TermColors[cell->attr.Background];
|
||||
Renderer.Paint(Renderer.Cursor.X, Renderer.Cursor.Y, blinker.Character, Enable ? blinker.Color : bgColor, bgColor);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user