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)
This commit is contained in:
Stephen White 2019-04-28 14:29:43 +10:00
parent fb295a7184
commit bf6d61d27b
3 changed files with 8 additions and 0 deletions

View file

@ -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;

View file

@ -54,6 +54,7 @@ public:
u32 ScaleY(u32 y) { return (u32)((float)y * scaleY); }
u32 GetFontHeight();
u32 GetFontHeightDirectoryDisplay();
void SwapBuffers() {}
private:

View file

@ -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) {}