From bf6d61d27b2bd181025a76090f690b5ae904c722 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Sun, 28 Apr 2019 14:29:43 +1000 Subject: [PATCH] Fixed bug with HDMI display and the font being half height. I have a better fix for this coming when I commit support for other LCDs and screens (each screen can use its own character set/font) --- src/Screen.cpp | 6 ++++++ src/Screen.h | 1 + src/ScreenBase.h | 1 + 3 files changed, 8 insertions(+) diff --git a/src/Screen.cpp b/src/Screen.cpp index 638eae6..999718d 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -185,7 +185,13 @@ void Screen::Clear(RGBA colour) DrawRectangle(0, 0, width, height, colour); } +// HACK: I have a better fix for this coming when I commit support for other LCDs and screens (each screen can use its own character set/font) u32 Screen::GetFontHeight() +{ + return 16; +} + +u32 Screen::GetFontHeightDirectoryDisplay() { if (CBMFont) return 8; diff --git a/src/Screen.h b/src/Screen.h index 794c3fa..1e4a8aa 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -54,6 +54,7 @@ public: u32 ScaleY(u32 y) { return (u32)((float)y * scaleY); } u32 GetFontHeight(); + u32 GetFontHeightDirectoryDisplay(); void SwapBuffers() {} private: diff --git a/src/ScreenBase.h b/src/ScreenBase.h index 4ebb07f..1664b24 100644 --- a/src/ScreenBase.h +++ b/src/ScreenBase.h @@ -70,6 +70,7 @@ public: virtual u32 GetFontWidth() { return 8; } virtual u32 GetFontHeight() = 0; + virtual u32 GetFontHeightDirectoryDisplay() { return 16; } virtual void SwapBuffers() = 0; virtual void RefreshRows(u32 start, u32 amountOfRows) {}