[MPlayer-dev-eng] [PATCH] getch2() support for OS/2

KO Myung-Hun komh at chollian.net
Wed Feb 20 09:48:13 CET 2008


Hi/2.


Diego Biurrun wrote:
> On Tue, Feb 19, 2008 at 04:19:49PM +0900, KO Myung-Hun wrote:
>   
>> Alban Bedel wrote:
>>     
>>> 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.
>>>       
>> Even in your case, we cannot avoid #ifdef statement to define macros for 
>> slave_cmd functions and select flag.
>>
>> I think, there is no big difference between them.
>>     
>
> Uglyness in other places is no excuse.  Give Alban's suggestion a try.
>
>   

I think, all you want is applied to this patch.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 1.1.8
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 750 MHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: getch2-os2.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080220/fe2b0f6e/attachment.txt>


More information about the MPlayer-dev-eng mailing list