[MPlayer-dev-eng] [PATCH] getch2() support for OS/2
Alban Bedel
albeu at free.fr
Mon Feb 18 19:09:48 CET 2008
On Tue, 19 Feb 2008 02:17:37 +0900
KO Myung-Hun <komh at chollian.net> wrote:
> @@ -2851,10 +2855,12 @@
> mp_input_init(use_gui);
> mp_input_add_key_fd(-1,0,mplayer_get_key,NULL);
> if(slave_mode)
> -#ifndef __MINGW32__
> +#ifdef __MINGW32__
> + mp_input_add_cmd_fd(0,0,mp_input_win32_slave_cmd_func,NULL);
> +#elif defined(__OS2__)
> + mp_input_add_cmd_fd(0,0,mp_input_os2_slave_cmd_func,NULL);
> +#else
> mp_input_add_cmd_fd(0,1,NULL,NULL);
> -#else
> - mp_input_add_cmd_fd(0,0,mp_input_win32_slave_cmd_func,NULL);
> #endif
> else if(!noconsolecontrols)
> mp_input_add_event_fd(0, getch2);
imho this should be done in a different way. This #ifdef mess is really
ugly. A single name for all slave_cmd functions is enouth, the build
system only compile the correct one anyway. And the NULL vs.
mp_input_slave_cmd_func can be solved with a simple define.
Albeu
More information about the MPlayer-dev-eng
mailing list