diff --git a/c_os/devices/BufferedCGA.cc b/c_os/devices/BufferedCGA.cc index a63b2fe..047e230 100755 --- a/c_os/devices/BufferedCGA.cc +++ b/c_os/devices/BufferedCGA.cc @@ -2,11 +2,11 @@ // Can't initialize in constructor as memory management already needs working CGA for output // NOTE: This has to be called when memorymanagement is active -void BufferedCGA::init() { - this->scrollback_buffer = new ScrollbackBuffer(COLUMNS, ROWS, 5); +void BufferedCGA::init(unsigned int pages) { + this->scrollback_buffer = new ScrollbackBuffer(COLUMNS, ROWS, pages); this->initialized = true; - this->print("\nInitialized scrollback buffer with 5 pages\n\n", 45); + this->print("\nInitialized scrollback buffer\n\n", 32); } void BufferedCGA::displaypage() { diff --git a/c_os/devices/BufferedCGA.h b/c_os/devices/BufferedCGA.h index c9550f8..64f02a8 100755 --- a/c_os/devices/BufferedCGA.h +++ b/c_os/devices/BufferedCGA.h @@ -19,10 +19,10 @@ private: public: BufferedCGA() : CGA(), initialized(false), current_page(0) {}; - void init(); // Scrollback needs to be initialized after memorymanagement - unsigned char current_page; // The page that is displayed - void scroll_page_backward(); // Scroll up the page history - void scroll_page_forward(); // Scroll down the page history (to the current page) + void init(unsigned int pages); // Scrollback needs to be initialized after memorymanagement + unsigned char current_page; // The page that is displayed + void scroll_page_backward(); // Scroll up the page history + void scroll_page_forward(); // Scroll down the page history (to the current page) void print(char* string, int n, unsigned char attrib = STD_ATTR) override; void scrollup() override;