fbterm: Make sure we're drawing with stride, not width

This commit is contained in:
K. Lange 2021-06-03 21:00:20 +09:00
parent afd23c0beb
commit 8239270074
1 changed files with 3 additions and 1 deletions

View File

@ -38,8 +38,10 @@ extern size_t lfb_memsize;
static uint32_t fg_color = FG_COLOR;
static uint32_t bg_color = BG_COLOR;
extern uint32_t lfb_resolution_s;
static void set_point(int x, int y, uint32_t value) {
((uint32_t*)lfb_vid_memory)[y * lfb_resolution_x + x] = value;
((uint32_t*)lfb_vid_memory)[y * (lfb_resolution_s/4) + x] = value;
}
static void write_char(int x, int y, int val, uint32_t color) {