1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-23 11:47:45 +00:00

getch2 should wait for input. Fixes 100% CPU usage during cache fill.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18071 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-04-10 12:42:10 +00:00
parent bb2203a63c
commit cfcf67ee5e

View File

@ -36,6 +36,7 @@ int getch2(int time){
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());