* miscfuncs.cc (low_priority_sleep): New function. Use throughout where code

is supposed to be giving up time slice.
* fhandler_console.cc (fhandler_console::read): Switch button 2/3 output escape
sequences to be consistent with xterm.
This commit is contained in:
Christopher Faylor
2002-11-13 19:36:12 +00:00
parent e91ec2e3e6
commit c0a02a4b42
13 changed files with 38 additions and 26 deletions

View File

@@ -291,3 +291,12 @@ sys_mbstowcs (WCHAR *tgt, const char *src, int len)
{
return MultiByteToWideChar (get_cp (), 0, src, -1, tgt, len);
}
void __stdcall
low_priority_sleep (DWORD secs)
{
DWORD prio = GetThreadPriority (GetCurrentThread ());
SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
Sleep (secs);
SetThreadPriority (GetCurrentThread (), prio);
}