From c51c1fc6681e20465de75436b5435947676fdabb Mon Sep 17 00:00:00 2001 From: uau Date: Sat, 25 Aug 2007 04:28:08 +0000 Subject: Make terminal input work more like VO key input The Unix version of getch2() could either return an internally buffered key or do a second-level select() in addition to the input.c one and then read more data. Change getch2() to always add all read keys with mplayer_put_key() (like video output window keyboard input does) and remove the internal select() from the Unix version. Make input.c call mplayer_get_key() directly. The primary motivation for this change is to make combining multiple event sources under one select() easier. Now getch2() only needs to be called when the corresponding fd is readable, and it will be possible to handle events from X-based VOs with the same code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24149 b3059339-0415-0410-9bf9-f77b7e298cf2 --- osdep/getch2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'osdep/getch2.h') diff --git a/osdep/getch2.h b/osdep/getch2.h index 66ace32da0..eb1ae49fa3 100644 --- a/osdep/getch2.h +++ b/osdep/getch2.h @@ -19,7 +19,7 @@ extern void getch2_enable(void); extern void getch2_disable(void); /* Read a character or a special key code (see keycodes.h) */ -extern int getch2(int halfdelay_time); +extern void getch2(void); #ifdef __MINGW32__ extern int mp_input_win32_slave_cmd_func(int fd,char* dest,int size); -- cgit v1.2.3