Flush input in veinlook, so it doesn't 'lag' so bad

develop
Petr Mrázek 2010-03-18 20:05:32 +01:00
parent d2afd21318
commit c283197b71
2 changed files with 7 additions and 0 deletions

@ -349,6 +349,7 @@ main(int argc, char *argv[])
digbit = false;
int c = getch(); /* refresh, accept single keystroke of input */
flushinp();
clrscr();
/* process the command keystroke */
switch(c)

@ -471,19 +471,25 @@ bool SHMProcess::suspend()
{
//fprintf(stderr,"%d invokes step\n",d->attachmentIdx);
// wait for the next window
/*
if(!d->SetAndWait(CORE_STEP))
{
throw Error::SHMLockingError("if(!d->SetAndWait(CORE_STEP))");
}
*/
D_SHMCMD = CORE_STEP;
}
else
{
//fprintf(stderr,"%d invokes suspend\n",d->attachmentIdx);
// lock now
/*
if(!d->SetAndWait(CORE_SUSPEND))
{
throw Error::SHMLockingError("if(!d->SetAndWait(CORE_SUSPEND))");
}
*/
D_SHMCMD = CORE_SUSPEND;
}
//fprintf(stderr,"waiting for lock\n");
// we wait for the server to give up our suspend lock (held by default)