From 47c447c5a7c5ed67a476e5123a835e7fec8aba91 Mon Sep 17 00:00:00 2001 From: Curle Date: Fri, 18 Jun 2021 22:18:37 +0100 Subject: [PATCH] Fighting the Actions build, round one. --- src/video/draw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/video/draw.c b/src/video/draw.c index 46efdae..a4824ac 100644 --- a/src/video/draw.c +++ b/src/video/draw.c @@ -108,11 +108,16 @@ inline void DrawPixel(size_t x, size_t y) { void FillScreen(uint32_t color) { uint32_t currentColor = GetForegroundColor(); for(uint32_t pixel = 0; pixel < bootldr.fb_width * bootldr.fb_height; pixel++) { - ((uint32_t*)fb)[pixel] = color; + ((uint32_t*)&fb)[pixel] = color; } SetForegroundColor(currentColor); } +static void Newline() { + // One row down, unless it goes off the screen, in which case start from the top. + PrintInfo.charPosY = PrintInfo.charPosY + 1 > PrintInfo.rowsPerScrn ? 0 : PrintInfo.charPosY + 1; +} + static void ProgressCursorS(size_t Steps) { if(PrintInfo.charPosX + Steps > PrintInfo.charsPerRow) { PrintInfo.charPosX = 0; @@ -120,7 +125,7 @@ static void ProgressCursorS(size_t Steps) { if(PrintInfo.charPosY + Rows > PrintInfo.rowsPerScrn) { size_t RowsLeft = PrintInfo.rowsPerScrn - PrintInfo.charPosY; ProgressCursorS(RowsLeft + 1); - NewLine(); + Newline(); } else { PrintInfo.charPosY += Rows; } @@ -129,10 +134,6 @@ static void ProgressCursorS(size_t Steps) { } } -static void Newline() { - // One row down, unless it goes off the screen, in which case start from the top. - PrintInfo.charPosY = PrintInfo.charPosY + 1 > PrintInfo.rowsPerScrn ? 0 : PrintInfo.charPosY + 1; -} static void ProgressCursor() { ProgressCursorS(1);