implement fbcon_scroll #2010

pull/2041/head
nick black 3 years ago
parent 57b54cda1d
commit 51e4f63b25
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -6,8 +6,18 @@ void fbcon_scroll(const struct ncpile* p, tinfo* ti, int rows){
return;
}
int totalrows = ti->cellpixy * p->dimy;
// FIXME iterate from 0.. dimy - rows, copy from |rows| down
// FIXME clear out bottom |rows| rows
int srows = rows * ti->cellpixy; // number of lines being scrolled
uint8_t* targ = ti->linux_fbuffer;
uint8_t* src = ti->linux_fbuffer + srows * ti->cellpixx * p->dimx * 4;
for(int r = 0 ; r < totalrows - srows ; ++r){
memcpy(targ, src, ti->cellpixx * p->dimx * 4);
targ += ti->cellpixx * p->dimx * 4;
src += ti->cellpixx * p->dimx * 4;
}
for(int r = totalrows - srows ; r < totalrows ; ++r){
memset(targ, 0, ti->cellpixx * p->dimx * 4);
targ += ti->cellpixx * p->dimx * 4;
}
}
// auxvecs for framebuffer are 1B each for s->cellpxx * s->cellpxy elements,

Loading…
Cancel
Save