From afa22dc6450a7f2341c432604d5e50735d6830c7 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 23 Jun 2022 20:16:07 +0200 Subject: perf: reduce cout flushing --- src/engine/user/cursor.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/engine/user/cursor.hpp') diff --git a/src/engine/user/cursor.hpp b/src/engine/user/cursor.hpp index ace47ee..16d37e3 100644 --- a/src/engine/user/cursor.hpp +++ b/src/engine/user/cursor.hpp @@ -39,9 +39,10 @@ class CursorController : public ICursorController, public: CursorController() noexcept; - void move(const Vector2 &direction, const uint32_t &amount) noexcept override; + void move(const Vector2 &direction, const uint32_t &amount, bool flush_cout) noexcept + override; - void move_to(const Vector2 &position) noexcept override; + void move_to(const Vector2 &position, bool flush_cout) noexcept override; [[nodiscard]] auto where() const noexcept -> Vector2 override; @@ -49,11 +50,11 @@ public: void update_position(const Vector2 &position) noexcept override; - void hide() noexcept override; + void hide(bool flush_cout) noexcept override; - void show() noexcept override; + void show(bool flush_cout) noexcept override; - void set_cursor_style(CursorStyle cursor_style) noexcept override; + void set_cursor_style(CursorStyle cursor_style, bool flush_cout) noexcept override; void set_bounds(const Bounds &bounds) noexcept override; -- cgit v1.2.3-18-g5258