1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-06 15:11:58 +00:00

terminal-win: minor simplification

Code should be equivalent.
This commit is contained in:
wm4 2014-09-09 19:20:35 +02:00
parent 670f965f1a
commit d0b525121a

View File

@ -78,7 +78,7 @@ static void read_input(void)
/*check if there are input events*/
if (!GetNumberOfConsoleInputEvents(in, &retval))
return;
if (retval <= 0)
if (!retval)
return;
/*read all events*/
@ -102,7 +102,7 @@ static void read_input(void)
mp_input_put_key(input_ctx, mpkey);
} else {
/*only characters should be remaining*/
int c = eventbuffer[i].Event.KeyEvent.uChar.UnicodeChar;
int c = record->uChar.UnicodeChar;
if (c > 0)
mp_input_put_key(input_ctx, c);
}