Eliminate spurous screen updates.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4857 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
pbrook 2008-07-07 23:01:25 +00:00
parent 28e1071183
commit b115bb3feb
2 changed files with 106 additions and 102 deletions

View File

@ -203,7 +203,9 @@ static void ssd0303_update_display(void *opaque)
int dest_width;
uint8_t mask;
if (s->redraw) {
if (!s->redraw)
return;
switch (s->ds->depth) {
case 0:
return;
@ -251,7 +253,7 @@ static void ssd0303_update_display(void *opaque)
dest += dest_width * 96;
}
}
}
s->redraw = 0;
dpy_update(s->ds, 0, 0, 96 * MAGNIFY, 16 * MAGNIFY);
}

View File

@ -184,7 +184,9 @@ static void ssd0323_update_display(void *opaque)
char *p;
int dest_width;
if (s->redraw) {
if (!s->redraw)
return;
switch (s->ds->depth) {
case 0:
return;
@ -255,7 +257,7 @@ static void ssd0323_update_display(void *opaque)
dest += dest_width * 128 * MAGNIFY;
}
}
}
s->redraw = 0;
dpy_update(s->ds, 0, 0, 128 * MAGNIFY, 64 * MAGNIFY);
}