From 02e7611eefd46380cbce65ace9da8399c27e78e8 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Tue, 3 Mar 2020 20:23:20 +0200 Subject: [PATCH] fixed --- src/dos/gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dos/gfx.c b/src/dos/gfx.c index 5a8a63b..c9a153d 100644 --- a/src/dos/gfx.c +++ b/src/dos/gfx.c @@ -174,7 +174,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 +189,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; -- 1.7.10.4