X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Fgfx.c;h=cde439e67e938663f392460a83c5ea179672db57;hb=ae47c13224ea63ac83f80ab332f7436b3265cdce;hp=5a8a63bd6f9c21b586841d9c7d06904dcbcd4c34;hpb=0e19f91320d17dc2df1fa0aeaa270b80eef545a9;p=eradicate diff --git a/src/dos/gfx.c b/src/dos/gfx.c index 5a8a63b..cde439e 100644 --- a/src/dos/gfx.c +++ b/src/dos/gfx.c @@ -83,6 +83,7 @@ int init_video(void) 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; @@ -174,7 +175,7 @@ void *set_video_mode(int idx, int nbuf) 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); @@ -189,7 +190,7 @@ void *set_video_mode(int idx, int nbuf) set_text_mode(); return 0; } - //memset(vpgaddr[0], 0xaa, pgsize); + memset(vpgaddr[0], 0xaa, pgsize); if(pgcount > 1) { vpgaddr[1] = (char*)vpgaddr[0] + pgsize;