From 3b283cb8609550d2fd479a9b91bbb60965df087b Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 28 Sep 2023 11:54:12 +0300 Subject: [PATCH] Kernel: Make tty overload correct has_data() function This allows snake game to work again :) --- kernel/include/kernel/Terminal/TTY.h | 2 +- kernel/kernel/Terminal/TTY.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/include/kernel/Terminal/TTY.h b/kernel/include/kernel/Terminal/TTY.h index 0cb81befcd..f6761a8e21 100644 --- a/kernel/include/kernel/Terminal/TTY.h +++ b/kernel/include/kernel/Terminal/TTY.h @@ -40,7 +40,7 @@ namespace Kernel void putchar(uint8_t ch); virtual void putchar_impl(uint8_t ch) = 0; - bool has_data() const; + virtual bool has_data_impl() const override; protected: TTY(mode_t mode, uid_t uid, gid_t gid) diff --git a/kernel/kernel/Terminal/TTY.cpp b/kernel/kernel/Terminal/TTY.cpp index e2c50884f0..cdd9f3f6e0 100644 --- a/kernel/kernel/Terminal/TTY.cpp +++ b/kernel/kernel/Terminal/TTY.cpp @@ -328,7 +328,7 @@ namespace Kernel return count; } - bool TTY::has_data() const + bool TTY::has_data_impl() const { LockGuard _(m_lock); return m_output.flush;