- reply.key = current->forwarded.key;
- reply.param = current->forwarded.param;
- }
- return reply;
-}
-
-/*****************************************************************************
-* intf_AssignNormalKeys: used for normal interfaces.
-*****************************************************************************
-* This function assign the basic key to the normal keys.
-*****************************************************************************/
-
-void intf_AssignNormalKeys( intf_thread_t *p_intf)
-{
- p_intf->p_intf_get_key = intf_GetKey;
-
- intf_AssignKey( p_intf , 'Q', INTF_KEY_QUIT, 0);
- intf_AssignKey( p_intf , 'q', INTF_KEY_QUIT, 0);
- intf_AssignKey( p_intf , 27, INTF_KEY_QUIT, 0);
- intf_AssignKey( p_intf , 3, INTF_KEY_QUIT, 0);
- intf_AssignKey( p_intf , '0', INTF_KEY_SET_CHANNEL, 0);
- intf_AssignKey( p_intf , '1', INTF_KEY_SET_CHANNEL, 1);
- intf_AssignKey( p_intf , '2', INTF_KEY_SET_CHANNEL, 2);
- intf_AssignKey( p_intf , '3', INTF_KEY_SET_CHANNEL, 3);
- intf_AssignKey( p_intf , '4', INTF_KEY_SET_CHANNEL, 4);
- intf_AssignKey( p_intf , '5', INTF_KEY_SET_CHANNEL, 5);
- intf_AssignKey( p_intf , '6', INTF_KEY_SET_CHANNEL, 6);
- intf_AssignKey( p_intf , '7', INTF_KEY_SET_CHANNEL, 7);
- intf_AssignKey( p_intf , '8', INTF_KEY_SET_CHANNEL, 8);
- intf_AssignKey( p_intf , '9', INTF_KEY_SET_CHANNEL, 9);
- intf_AssignKey( p_intf , '0', INTF_KEY_SET_CHANNEL, 0);
- intf_AssignKey( p_intf , '+', INTF_KEY_INC_VOLUME, 0);
- intf_AssignKey( p_intf , '-', INTF_KEY_DEC_VOLUME, 0);
- intf_AssignKey( p_intf , 'm', INTF_KEY_TOGGLE_VOLUME, 0);
- intf_AssignKey( p_intf , 'M', INTF_KEY_TOGGLE_VOLUME, 0);
- intf_AssignKey( p_intf , 'g', INTF_KEY_DEC_GAMMA, 0);
- intf_AssignKey( p_intf , 'G', INTF_KEY_INC_GAMMA, 0);
- intf_AssignKey( p_intf , 'c', INTF_KEY_TOGGLE_GRAYSCALE, 0);
- intf_AssignKey( p_intf , ' ', INTF_KEY_TOGGLE_INTERFACE, 0);
- intf_AssignKey( p_intf , 'i', INTF_KEY_TOGGLE_INFO, 0);
- intf_AssignKey( p_intf , 's', INTF_KEY_TOGGLE_SCALING, 0);
-}
-
-/*****************************************************************************
- * intf_ProcessKey: process standard keys
- *****************************************************************************
- * This function will process standard keys and return non 0 if the key was
- * unknown.
- *****************************************************************************/
-int intf_ProcessKey( intf_thread_t *p_intf, int g_key )
-{
- static int i_volbackup;
- keyparm k_reply;
-
- k_reply = intf_GetKey( p_intf, g_key);
-
- switch( k_reply.key )
- {
- case INTF_KEY_QUIT: /* quit order */
- p_intf->b_die = 1;
- break;
- case INTF_KEY_SET_CHANNEL:
- /* Change channel - return code is ignored since SelectChannel displays
- * its own error messages */
- intf_SelectChannel( p_intf, k_reply.param - '0' );
- break;
- case INTF_KEY_INC_VOLUME: /* volume + */
- if( (p_main->p_aout != NULL) && (p_main->p_aout->vol < VOLMAX) )
- p_main->p_aout->vol += VOLSTEP;
- break;
- case INTF_KEY_DEC_VOLUME: /* volume - */
- if( (p_main->p_aout != NULL) && (p_main->p_aout->vol > VOLSTEP) )
- p_main->p_aout->vol -= VOLSTEP;
- break;
- case INTF_KEY_TOGGLE_VOLUME: /* toggle mute */
- if( (p_main->p_aout != NULL) && (p_main->p_aout->vol))