"Waste cpu while rotating view"
  I added a tiny idle in the 'wait_for_statechanged' call, I suspect
  ghostwinlay returns events while holding mousebutton...
This commit is contained in:
Ton Roosendaal 2003-09-17 11:05:33 +00:00
parent c01d06df3c
commit bcd01942d8
2 changed files with 6 additions and 2 deletions

@ -1605,6 +1605,8 @@ void BIF_wait_for_statechange(void)
}
statechanged= 0;
}
else PIL_sleep_ms(3); /* statechanged can be set '1' while holding mousebutton, causing locks */
}
void getmouse(short *mval)
{

@ -521,8 +521,10 @@ void viewmove(int mode)
scrarea_do_windraw(curarea);
screen_swapbuffers();
}
else BIF_wait_for_statechange();
else {
BIF_wait_for_statechange();
}
/* this in the end, otherwise get_mbut does not work on a PC... */
if( !(get_mbut() & (L_MOUSE|M_MOUSE))) break;
}