# HG changeset patch # User reimar # Date 1144672930 0 # Node ID c1e25c011c544f32e2c106189f8695ad52af2a6a # Parent b644dfdeda482875086504d91515f4e4a9e73bb7 getch2 should wait for input. Fixes 100% CPU usage during cache fill. diff -r b644dfdeda48 -r c1e25c011c54 osdep/getch2-win.c --- a/osdep/getch2-win.c Mon Apr 10 07:28:14 2006 +0000 +++ b/osdep/getch2-win.c Mon Apr 10 12:42:10 2006 +0000 @@ -36,6 +36,7 @@ int i=0; if(!getch2_status)return -1; /*check if there are input events*/ + WaitForSingleObject(stdin, time); if(!GetNumberOfConsoleInputEvents(stdin,&retval)) { printf("getch2: can't get number of input events: %i\n",GetLastError());