From 4a0b7a5bf17c88d93a1733373810f1880e00c8ee Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Thu, 28 Nov 2019 12:19:46 +0100 Subject: [PATCH] ~ changed default values for resolution and font --- src/Color.hpp | 2 +- src/internal.cpp | 2 +- src/internal.hpp | 2 +- src/vkvm.cpp | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Color.hpp b/src/Color.hpp index 4ec1b75..8b3cc99 100644 --- a/src/Color.hpp +++ b/src/Color.hpp @@ -21,7 +21,7 @@ namespace vkvm { Color(unsigned char red, unsigned char green, unsigned char blue) noexcept; explicit Color(unsigned int hex) noexcept; - + auto getRed() -> unsigned char; auto getGreen() -> unsigned char; diff --git a/src/internal.cpp b/src/internal.cpp index 798c3b2..436c76e 100644 --- a/src/internal.cpp +++ b/src/internal.cpp @@ -36,7 +36,7 @@ namespace vkvm { } auto callEvent(EventType type) -> bool { - auto ivt = getInterrupTable(); + auto ivt = getInterruptTable(); for(int i = 0; i < impl.interruptEntrysPerEventType;i++){ auto &entry= ivt[type * impl.interruptEntrysPerEventType + i]; if (entry.pid != 0) { diff --git a/src/internal.hpp b/src/internal.hpp index f828779..e1b5ea2 100644 --- a/src/internal.hpp +++ b/src/internal.hpp @@ -79,7 +79,7 @@ constexpr int keyboardBufferSize = 16; auto onSignal(int signalNumber, void(*callback)(int)) -> void; - auto getInterrupTable() -> InterruptEntry *; + auto getInterruptTable() -> InterruptEntry *; auto getRegisters() -> Registers *; diff --git a/src/vkvm.cpp b/src/vkvm.cpp index 0cda6b6..6401b5c 100644 --- a/src/vkvm.cpp +++ b/src/vkvm.cpp @@ -29,13 +29,14 @@ namespace vkvm { setForegroundColor(white); setRedrawInterval(20);// NOLINT setTimerInterruptInterval(10);// NOLINT + setFont(FontType(3,"",0,0)); } impl.localMemoryWarn = true; } auto registerEvent(EventType type, const std::function &handler) -> bool { int signum = SIGUSR1 + impl.eventTable.size(); - auto ivt = getInterrupTable(); + auto ivt = getInterruptTable(); lockSharedMemory(); @@ -288,7 +289,7 @@ namespace vkvm { auto getFont() -> FontType { //TODO(julian): get font properly - return font_1; + return FontType(getRegisters()->textMode_font, "", 0, 0); } auto setFont(const FontType &newValue) -> void {