vmptr->rmask = calc_mask(minf.rsize, minf.rpos);
vmptr->gmask = calc_mask(minf.gsize, minf.gpos);
vmptr->bmask = calc_mask(minf.bsize, minf.bpos);
+ vmptr->bpp = vmptr->rbits + vmptr->gbits + vmptr->bbits;
}
if(minf.attr & VBE_ATTR_LFB) {
vmptr->fb_addr = minf.fb_addr;
if(nbuf < 1) nbuf = 1;
if(nbuf > 2) nbuf = 2;
pgcount = nbuf > vm->max_pages ? vm->max_pages : nbuf;
- pgsize = vm->xsz * vm->ysz * vm->pitch;
+ pgsize = vm->ysz * vm->pitch;
fbsize = pgcount * pgsize;
printf("pgcount: %d, pgsize: %d, fbsize: %d\n", pgcount, pgsize, fbsize);
set_text_mode();
return 0;
}
- //memset(vpgaddr[0], 0xaa, pgsize);
+ memset(vpgaddr[0], 0xaa, pgsize);
if(pgcount > 1) {
vpgaddr[1] = (char*)vpgaddr[0] + pgsize;