diff options
author | jaseg <jaseg@jaseg.net> | 2014-03-07 01:08:04 +0100 |
---|---|---|
committer | jaseg <jaseg@jaseg.net> | 2014-03-07 01:08:04 +0100 |
commit | 15b7221813a039df3e0690b3e2ed59a0561f2926 (patch) | |
tree | 87a0e1d031f07731e37cb53c043afd3ba4820adc /host/font.c | |
parent | d16223fd257ccc1d7060e372eb3d950cf68f8d37 (diff) | |
download | matelight-15b7221813a039df3e0690b3e2ed59a0561f2926.tar.gz matelight-15b7221813a039df3e0690b3e2ed59a0561f2926.tar.bz2 matelight-15b7221813a039df3e0690b3e2ed59a0561f2926.zip |
New, fancy schmancy scrolling working as intended
Diffstat (limited to 'host/font.c')
-rw-r--r-- | host/font.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/font.c b/host/font.c index c1f1d22..59bc2ef 100644 --- a/host/font.c +++ b/host/font.c @@ -18,12 +18,13 @@ void render_glyph(glyph_t *g, color_t *buf, unsigned int bufwidth, int offx, uns } color_t *p = buf + (offy+y)*bufwidth + offx; /* Take care to only render what's within the framebuffer's bounds */ - for(unsigned int x=0; (x < g->width) && (offx+x < bufwidth); x++){ + for(int x=0; (x < g->width) && (offx+x < (int)bufwidth); x++){ if(offx + x >= 0){ color_t c = (data&(1<<(g->width-1))) ? fg : bg; - *p++ = c; - data <<= 1; + *p = c; } + p++; + data <<= 1; } } } |