mouse: fix cursor redraw to prevent screen blanking (thanks erik)
This commit is contained in:
parent
c31c4ca7b3
commit
4fcc5efce5
1 changed files with 7 additions and 3 deletions
|
@ -517,6 +517,9 @@ shouldredraw(void*)
|
||||||
static void
|
static void
|
||||||
mouseproc(void*)
|
mouseproc(void*)
|
||||||
{
|
{
|
||||||
|
ulong counter;
|
||||||
|
|
||||||
|
counter = ~0;
|
||||||
while(waserror())
|
while(waserror())
|
||||||
;
|
;
|
||||||
for(;;){
|
for(;;){
|
||||||
|
@ -524,10 +527,11 @@ mouseproc(void*)
|
||||||
mouse.redraw = 0;
|
mouse.redraw = 0;
|
||||||
cursoroff();
|
cursoroff();
|
||||||
cursoron();
|
cursoron();
|
||||||
drawactive(1);
|
|
||||||
} else {
|
|
||||||
drawactive(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drawactive(mouse.counter != counter);
|
||||||
|
counter = mouse.counter;
|
||||||
|
|
||||||
tsleep(&mouse.redrawr, shouldredraw, 0, 20*1000);
|
tsleep(&mouse.redrawr, shouldredraw, 0, 20*1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue