From 3e07b04564acc6cf36124be785d2b4471195d5e7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 8 Sep 2021 18:38:38 +0200 Subject: [PATCH] Kernel: Remove some unused code in Graphics::TextModeConsole --- Kernel/Graphics/Console/TextModeConsole.cpp | 16 +--------------- Kernel/Graphics/Console/TextModeConsole.h | 6 +----- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Kernel/Graphics/Console/TextModeConsole.cpp b/Kernel/Graphics/Console/TextModeConsole.cpp index 9df455e4bd..fc55c56e94 100644 --- a/Kernel/Graphics/Console/TextModeConsole.cpp +++ b/Kernel/Graphics/Console/TextModeConsole.cpp @@ -89,9 +89,7 @@ void TextModeConsole::set_cursor(size_t x, size_t y) { SpinlockLocker main_lock(GraphicsManagement::the().main_vga_lock()); SpinlockLocker lock(m_vga_lock); - m_cursor_x = x; - m_cursor_y = y; - u16 value = m_current_vga_start_address + (y * width() + x); + u16 value = y * width() + x; IO::out8(0x3d4, 0x0e); IO::out8(0x3d5, MSB(value)); IO::out8(0x3d4, 0x0f); @@ -160,18 +158,6 @@ void TextModeConsole::clear_vga_row(u16 row) clear(row * width(), width(), width()); } -void TextModeConsole::set_vga_start_row(u16 row) -{ - SpinlockLocker lock(m_vga_lock); - m_vga_start_row = row; - m_current_vga_start_address = row * width(); - m_current_vga_window = m_current_vga_window + row * width() * bytes_per_base_glyph(); - IO::out8(0x3d4, 0x0c); - IO::out8(0x3d5, MSB(m_current_vga_start_address)); - IO::out8(0x3d4, 0x0d); - IO::out8(0x3d5, LSB(m_current_vga_start_address)); -} - void TextModeConsole::write(char ch, bool critical) { write(m_x, m_y, ch, critical); diff --git a/Kernel/Graphics/Console/TextModeConsole.h b/Kernel/Graphics/Console/TextModeConsole.h index 72e2e28d5c..9a5ebfc4da 100644 --- a/Kernel/Graphics/Console/TextModeConsole.h +++ b/Kernel/Graphics/Console/TextModeConsole.h @@ -35,15 +35,11 @@ public: private: void clear_vga_row(u16 row); - void set_vga_start_row(u16 row); explicit TextModeConsole(const VGACompatibleAdapter&); mutable Spinlock m_vga_lock; - u16 m_vga_start_row { 0 }; - u16 m_current_vga_start_address { 0 }; u8* m_current_vga_window { nullptr }; - u16 m_cursor_x { 0 }; - u16 m_cursor_y { 0 }; }; + }