diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-10 12:42:10 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-10 12:42:10 +0000 |
commit | cfcf67ee5e3035a49542a58e1b2bda28c956e231 (patch) | |
tree | 8a882c0845ea265dfdb288f5f24c2ee67a363951 /osdep/getch2-win.c | |
parent | bb2203a63c64e0c1cc45dc18cf9edfc716ea198a (diff) | |
download | mpv-cfcf67ee5e3035a49542a58e1b2bda28c956e231.tar.bz2 mpv-cfcf67ee5e3035a49542a58e1b2bda28c956e231.tar.xz |
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
Diffstat (limited to 'osdep/getch2-win.c')
-rw-r--r-- | osdep/getch2-win.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c index 449a44b7b4..b2495e65b0 100644 --- a/osdep/getch2-win.c +++ b/osdep/getch2-win.c @@ -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()); |