Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix framebuffer character drawing
  • Loading branch information
djphoenix committed May 27, 2019
1 parent 4249e8f commit 75aea2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/kernlib/display.cpp
Expand Up @@ -100,10 +100,9 @@ class FramebufferDisplay: public Display {
uint8_t *line = fbptr + y * width * pb;
uint8_t fontline = fontsym[y];
for (size_t x = 0; x < 8; x++) {
if (fontline & (1 << (8 - x))) {
for (size_t px = 0; px < pb; px++)
line[x * pb + px] = 0xFF;
}
uint8_t val = (fontline & (1 << (8 - x))) ? 0xFF : 0x00;
for (size_t px = 0; px < pb; px++)
line[x * pb + px] = val;
}
}

Expand Down

0 comments on commit 75aea2e

Please sign in to comment.