ref: 4fb7462bd53daffa8376a752cc06ad7cacfa85a9
parent: 759656ad4cc778b6cff47296b718cd388e762adc
author: cinap_lenrek <[email protected]>
date: Fri Apr 24 16:26:38 EDT 2020
pc, pc64: use softscreen double buffering for *bootscreen= framebuffer it is probably almost always a good idea to use double buffering with a unaccelerated framebuffer.
--- a/sys/src/9/pc/screen.c
+++ b/sys/src/9/pc/screen.c
@@ -573,7 +573,6 @@
void
bootscreeninit(void)
{
- static Memdata md;
VGAscr *scr;
int x, y, z;
ulong chan, pa, sz;
@@ -622,9 +621,7 @@
if(memimageinit() < 0)
return;
- md.ref = 1;
- md.bdata = scr->vaddr;
- gscreen = allocmemimaged(Rect(0,0,x,y), chan, &md);
+ gscreen = allocmemimage(Rect(0,0,x,y), chan);
if(gscreen == nil)
return;
@@ -632,8 +629,8 @@
scr->memdefont = getmemdefont();
scr->gscreen = gscreen;
scr->gscreendata = gscreen->data;
- scr->softscreen = 0;
- scr->useflush = 0;
+ scr->softscreen = 1;
+ scr->useflush = 1;
scr->dev = nil;
physgscreenr = gscreen->r;
@@ -640,6 +637,8 @@
vgaimageinit(chan);
vgascreenwin(scr);
+
+ drawcmap();
scr->cur = &vgasoftcur;
scr->cur->enable(scr);