[MPlayer-cvslog] CVS: main/libvo vo_dfbmga.c,1.28,1.29

Alban Bedel albeu at free.fr
Wed Oct 26 13:28:17 CEST 2005


On Wed, 26 Oct 2005 09:41:44 +0200 (CEST)
syncmail at mplayerhq.hu (Ville Syrjälä CVS) wrote:

> +
> +               case DIKS_POWER:
> +                    mplayer_put_key( 'q' );
> +                    break;
> +               case DIKS_MENU:
> +                    mplayer_put_key( 'o' );
> +                    break;
> +               case DIKS_PLAY:
> +               case DIKS_STOP:
> +               case DIKS_PAUSE:
> +               case DIKS_PLAYPAUSE:
> +                    mplayer_put_key( ' ' );
> +                    break;
> +               case DIKS_FORWARD:
> +               case DIKS_NEXT:
> +                    mplayer_put_key( KEY_PAGE_UP );
> +                    break;
> +               case DIKS_REWIND:
> +               case DIKS_PREVIOUS:
> +                    mplayer_put_key( KEY_PAGE_DOWN );
> +                    break;
> +               case DIKS_VOLUME_UP:
> +                    mplayer_put_key( '0' );
> +                    break;
> +               case DIKS_VOLUME_DOWN:
> +                    mplayer_put_key( '9' );
> +                    break;
> +               case DIKS_MUTE:
> +                    mplayer_put_key( 'm' );
> +                    break;

This is definitly wrong, the user can map any command to the keys. Instead
you should define new keycodes (in osdep/keycodes.h and input/input.c)
and return those here. Then add some default bindings in input/input.c.

	Albeu




More information about the MPlayer-cvslog mailing list