summaryrefslogtreecommitdiff
path: root/Kernel/TTY
diff options
context:
space:
mode:
authorJesse Buhagiar <jesse.buhagiar@student.rmit.edu.au>2020-02-18 21:46:52 +1100
committerAndreas Kling <kling@serenityos.org>2020-02-18 12:55:31 +0100
commit35ba4bf005aa885c5e7913f16dc93d046509d0ce (patch)
treeaa510053c54259ccd079f83cfbb58defe0c7493a /Kernel/TTY
parent94ed183774b2cac1cf57d184078d741d7ea2a365 (diff)
downloadserenity-35ba4bf005aa885c5e7913f16dc93d046509d0ce.zip
TTY: Reset VGA start row when setting graphical TTY
This was causing the screen (on a real machine) to be split in half.
Diffstat (limited to 'Kernel/TTY')
-rw-r--r--Kernel/TTY/VirtualConsole.cpp8
-rw-r--r--Kernel/TTY/VirtualConsole.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp
index c33c20d4b6..2642cb240b 100644
--- a/Kernel/TTY/VirtualConsole.cpp
+++ b/Kernel/TTY/VirtualConsole.cpp
@@ -65,6 +65,14 @@ void VirtualConsole::initialize()
s_active_console = -1;
}
+void VirtualConsole::set_graphical(bool graphical)
+{
+ if (graphical)
+ set_vga_start_row(0);
+
+ m_graphical = graphical;
+}
+
VirtualConsole::VirtualConsole(unsigned index, InitialContents initial_contents)
: TTY(4, index)
, m_index(index)
diff --git a/Kernel/TTY/VirtualConsole.h b/Kernel/TTY/VirtualConsole.h
index 6d66394445..222b86d596 100644
--- a/Kernel/TTY/VirtualConsole.h
+++ b/Kernel/TTY/VirtualConsole.h
@@ -49,7 +49,7 @@ public:
static void initialize();
bool is_graphical() { return m_graphical; }
- void set_graphical(bool graphical) { m_graphical = graphical; }
+ void set_graphical(bool graphical);
private:
// ^KeyboardClient