www.pudn.com > 6027_HD65.rar > keyproc.c


/**********************************************************************/ 
/***************    MTK CONFIDENTIAL & COPYRIGHTED     ****************/ 
/***************                                       ****************/ 
/***************  $Modtime:: 04/07/08 8:38p    $       ****************/ 
/***************  $Revision:: 27               $       ****************/ 
/***************                                       ****************/ 
/***************   Description : Play module for       ****************/ 
/***************                 non-disc dependant    ****************/ 
/***************                 key processing        ****************/ 
/***************                                       ****************/ 
/***************       Company : MediaTek Inc.         ****************/ 
/***************    Programmer :                       ****************/ 
/**********************************************************************/ 
 
#pragma NOAREGS 
#include "general.h" 
 
// ********************************************************************* 
// NonISO(DVD,VCD,CDDA,AUDIO_IN key function 
// ********************************************************************* 
static BOOL fgNonISONumKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDNumKey()); 
  } 
#ifdef VCD_SUPPORT   
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDNumKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDANumKey()); 
  }   
#endif   
  else 
  { 
    return (UOP_OK); 
  }   
   
}   
static BOOL fgNonISODirKey(void) large 
{ 
  BYTE bParm; 
 
  switch(_bIRKey) 
  { 
    case IR_UP: 
      bParm = SV_UP; 
      break; 
    case IR_DOWN: 
      bParm = SV_DOWN; 
      break; 
    case IR_LEFT: 
      bParm = SV_LEFT; 
      break; 
    case IR_RIGHT: 
      bParm = SV_RIGHT; 
      break; 
    default: 
      return (UOP_FAIL); 
  } 
  if( fgIsDvdPlay() ) 
  { 
#ifdef DVD_IGNORE_BTN_NO_CMD 
  vSendUopCmd(UOP_ARROW_BTN, bParm, 0, 0); 
#else 
  vSendUopCmd(UOP_ARROW_BTN, bParm, 1, 0); 
#endif 
  } 
  else 
  { 
    vSendUopCmd(UOP_ARROW_BTN, bParm, 0, 0); 
  }    
  return (UOP_OK); 
} 
static BOOL fgNonISOEnterKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDEnterKey()); 
  } 
  else 
  { 
    return (UOP_OK); 
  }   
}   
static BOOL fgNonISOPlayKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDPlayKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDPlayKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAPlayKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }   
}   
static BOOL fgNonISOPauseKey(void) large 
{ 
  BYTE bPbcState = bSharedInfo(SI_PBC_STATE); 
 
  if (!fgIsDiscPlay(bPbcState)) 
  { 
    vOsdShowError(SV_ERR_PLAYBACK_ONLY, OSD_TIMEOUT_SHORT); 
    return (UOP_OK); 
  } 
 
  if (bSharedInfo(SI_PBC_STATE) == SV_PAUSE) 
  { 
    vSendUopCmd(UOP_PLAY, 0, 0, 0); 
  } 
  else 
  { 
    vSendUopCmd(UOP_PAUSE, 0, 0, 0); 
  } 
 
  return (UOP_OK); 
   
}   
 
static BOOL fgNonISOStopKey(void) large 
{ 
  BYTE bState = bSharedInfo(SI_PBC_STATE); 
  BYTE bDiscType = bSharedInfo(SI_DISC_TYPE); 
   
  if ( fgIsDvdPlay() || fgIsVcdPlay() ) 
  { 
#if defined(PROG_NO_STOP_RESUME) 
    if ((bSharedInfo(SI_USR_PBC_CTRL) == SV_PROGRAM) && 
        (fgIsDiscPlay(bState))) 
    { 
      vSendUopCmd(UOP_STOP, 0, 0, 0); 
      vSendUopCmd(UOP_STOP, 0, 0, 0); 
      /* 
      vSendUopCmd(UOP_STOP, 0, 0, SV_STOP_FORCE); 
      */ 
      return (UOP_OK); 
    } 
#endif 
 
#if (STOP_RESUME_STYLE == STOP_RESUME_TWO_KEYS) 
    if (bState == SV_STOP_RESUME) 
    { 
      return (UOP_OK); 
    } 
#endif 
 
    vSendUopCmd(UOP_STOP, 0, 0, 0); 
 
    return (UOP_OK);   
  } 
#ifndef CDDA_USE_CDFS 
  else if (fgIsCddaPlay()) 
  { 
    return( fgCDDAStopKey()); 
  }   
#endif   
  else 
  { 
    return (UOP_OK);   
  }   
}   
 
static BOOL fgNonISONextKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDNextKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDNextKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDANextKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }     
}   
 
static BOOL fgNonISOPrevKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDPrevKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDPrevKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAPrevKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }     
}   
 
static BOOL fgNonISORepeatKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDRepeatKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDRepeatKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDARepeatKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }     
}   
BOOL fgNonISOResumeKey() 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDResumeKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDResumeKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAResumeKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
 
static BOOL fgNonISOFFKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDFFKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDFFKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAFFKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
 
static BOOL fgNonISOFRKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDFRKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDFRKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAFRKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
 
#ifndef DISABLE_SF 
static BOOL fgNonISOSFKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDSFKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDSFKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
#endif /*#ifndef DISABLE_SF*/ 
 
#ifndef DISABLE_SR 
static BOOL fgNonISOSRKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDSRKey()); 
  } 
  else 
  { 
    return (UOP_OK); 
  }       
}   
#endif 
 
static BOOL fgNonISOStepFKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDStepFKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDStepFKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
 
static BOOL fgNonISOStepRKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDStepRKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDStepRKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
 
static BOOL fgNonISOA2BKey(void) large 
{ 
  BYTE bPbcState = bSharedInfo(SI_PBC_STATE); 
   
  if ( fgIsDvdPlay() || fgIsVcdPlay() ) 
  { 
    if (!fgIsDiscPlay(bPbcState)) 
    { 
      vOsdShowError(SV_ERR_PLAYBACK_ONLY, OSD_TIMEOUT_SHORT); 
      return (UOP_OK); 
    } 
   
    vSendUopCmd(UOP_A_TO_B, 0, 0, 0); 
   
    return UOP_OK;     
  }   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay() ) 
  { 
    return ( fgCDDAA2BKey() ); 
  }   
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
 
}   
 
static BOOL fgNonISOTitleKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDTitleKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDReturnKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
}   
 
static BOOL fgNonISOMenuKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDMenuKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDReturnKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
} 
 
static BOOL fgNonISOReturnKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDReturnKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDReturnKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }       
} 
   
static BOOL fgNonISOAudioKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDAudioKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDAudioKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAAudioKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
 
static BOOL fgNonISOSpKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDSpKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDSpKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
 
static BOOL fgNonISOAngleKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDAngleKey()); 
  } 
  else 
  { 
    return (UOP_OK); 
  }         
}   
 
static BOOL fgNonISODisplayKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDRemainKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDRemainKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDARemainKey()); 
  }     
#endif   
#ifdef AUDIO_IN_EN     
  else if (fgIsAinPlay()) 
  { 
    return (fgAINDisplayKey()); 
  }   
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
 
static BOOL fgNonISOSearchKey(BOOL fgGoto) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDSearchKey(fgGoto)); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDSearchKey(fgGoto)); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDASearchKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
 
#ifdef PLAYER_BOOKMARK 
static BOOL fgNonISOMarkKey(void) large 
{        
  if( fgIsDvdPlay() || fgIsVcdPlay() ) 
  { 
    if(bSharedInfo(SI_PBC_STATE) == SV_PAUSE)   
    { 
      vChangeInputState(INPUT_STATE_BOOKMARK, FALSE); 
    } 
    else 
    { 
      vSetSharedInfo(SH_PAUSE_SHOW_WB,SV_SHOW_BOOKMARK); 
      if(fgIsDvdPlay()) 
      { 
        vSendUopCmd(UOP_PAUSE, 0, 0, SV_SHOW_MENU); 
      } 
      else if(fgIsVcdPlay()) 
      { 
        vSendUopCmd(UOP_PAUSE, 0, 0, 0); 
      } 
    } 
  } 
#ifndef CDDA_USE_CDFS   
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAMarkKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  } 
  //move to return uop_pause 
/* 
  if( fgIsDvdPlay() || fgIsVcdPlay() ) 
  { 
#ifdef PLAYER_BOOKMARK 
    vChangeInputState(INPUT_STATE_BOOKMARK, FALSE); 
#endif 
    return (UOP_OK);     
  } 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAMarkKey()); 
  }     
  else 
  { 
    return (UOP_OK); 
  }       
*/ 
  return (UOP_OK); 
}   
#endif 
 
static BOOL fgNonISOPbcKey(void) large 
{ 
#ifdef VCD_SUPPORT         
  if ( fgIsVcdPlay() ) 
  { 
    return( fgVCDPbcKey() ); 
  }   
  else 
#endif   
  { 
    return (UOP_OK); 
  }   
}   
 
#ifdef PLAYER_DIGEST 
static BOOL fgNonISODigestKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDDigestKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDDigestKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDADigestKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
#endif 
 
#ifdef PLAYER_PROGRAM 
static BOOL fgNonISOProgramKey(void) large 
{ 
  if( 0  
#ifdef DVD_PROGRAM   
  || fgIsDvdPlay() 
#endif  
#ifdef VCD_PROGRAM  
  || fgIsVcdPlay() 
#endif 
#ifdef CDDA_PROGRAM 
  || fgIsCddaPlay() 
#endif 
  ) 
  { 
    if((bSharedInfo(SI_PBC_STATE) == SV_PAUSE)   
#ifdef CDDA_PROGRAM 
  || fgIsCddaPlay() 
#endif 
      ) 
    { 
      vChangeInputState(INPUT_STATE_PROGRAM, FALSE); 
    } 
    else 
    {      
      vSetSharedInfo(SH_PAUSE_SHOW_WB,SV_SHOW_PROGRAM); 
      if(fgIsDvdPlay()) 
      { 
        vSendUopCmd(UOP_PAUSE, 0, 0, SV_SHOW_MENU); 
      } 
      else if(fgIsVcdPlay()) 
      { 
        vSendUopCmd(UOP_PAUSE, 0, 0, 0); 
      } 
    } 
  } 
  else  
  { 
    vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT); 
  }   
 
  return (UOP_OK);   
}   
#endif 
 
static BOOL fgNonISOShuffleKey(void) large 
{ 
  BYTE bUsrCtrl = bSharedInfo(SI_USR_PBC_CTRL); 
  BYTE bRepeatType = bSharedInfo(SI_REPEAT_MODE); 
 
#ifdef USR_CTRL_CANCEL_REPEAT 
  if ((bRepeatType != SV_REPEAT_NONE) && 
      (bRepeatType != SV_REPEAT_ABNONE)) 
  { 
    vSendUopCmd(UOP_REPEAT, SV_REPEAT_NONE, 0, 0); 
  } 
#endif /* USR_CTRL_CANCEL_REPEAT */ 
 
  switch (bUsrCtrl) 
  { 
    case SV_SHUFFLE: 
#ifdef SHUFFLE_RANDOM_SAME_KEY 
      vSendUopCmd(UOP_RANDOM, SV_ON, 0, 0); 
#else 
      vSendUopCmd(UOP_SHUFFLE, SV_OFF, 0, 0); 
#endif 
      break; 
 
    case SV_RANDOM: 
      /* back to sequential play */ 
      vSendUopCmd(UOP_RANDOM, SV_OFF, 0, 0); 
      break; 
 
    default: 
      vSendUopCmd(UOP_SHUFFLE, SV_ON, 0, 0); 
      break; 
  } /* switch (bUsrCtrl) */ 
 
  return (UOP_OK); 
}   
 
#ifdef PLAYER_VRMT 
static BOOL fgNonISOVremoteKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDVremoteKey()); 
  } 
#ifdef VCD_SUPPORT   
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDVremoteKey()); 
  } 
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
#endif 
 
#ifdef MEMORY_SUPPORT 
static BOOL fgNonISOMemoryKey(void) large 
{ 
  vSendUopCmd(UOP_MEMORY, 0, 0, 0); 
 
  return (UOP_OK); 
}   
#endif 
 
static BOOL fgNonISOTvModeKey(void) large 
{ 
  if ( fgIsDvdPlay() ) 
  { 
    return ( fgDVDTvModeKey() ); 
  }   
  else 
  { 
    return (UOP_OK); 
  }   
}   
 
static BOOL fgNonISOZoomInKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDZoomInKey()); 
  } 
#ifdef VCD_SUPPORT 
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDZoomInKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAZoomInKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }         
}   
 
#ifndef DISABLE_ZOOM_OUT 
static BOOL fgNonISOZoomOutKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDZoomOutKey()); 
  } 
#ifdef VCD_SUPPORT   
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDZoomOutKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAZoomOutKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }           
}   
#endif /*#ifndef DISABLE_ZOOM_OUT */ 
 
#ifdef ENABLE_ZOOM_USER_MODE 
static BOOL fgNonISOZoomUsrKey(void) large 
{ 
  if( fgIsDvdPlay() ) 
  { 
    return (fgDVDZoomUsrKey()); 
  } 
#ifdef VCD_SUPPORT   
  else if ( fgIsVcdPlay() ) 
  { 
    return (fgVCDZoomUsrKey()); 
  } 
#endif   
#ifndef CDDA_USE_CDFS 
  else if ( fgIsCddaPlay()) 
  { 
    return (fgCDDAZoomUsrKey()); 
  }     
#endif   
  else 
  { 
    return (UOP_OK); 
  }           
}   
#endif 
static BOOL fgNonFunctionKey(void) large 
{ 
#ifdef AUDIO_IN_EN   
  if ( fgIsAinPlay() ) 
  { 
    return ( fgAINFunctionKey() ); 
  }   
  else 
#endif   
  { 
    return (UOP_OK); 
  }   
}   
static BOOL fgNonISOPasswordKey(void) large 
{ 
  if ( fgIsDvdPlay() ) 
  { 
    return ( fgDVDPasswordKey() ); 
  }   
  else 
  { 
    return (UOP_OK); 
  }   
}   
 
#ifdef SUPPORT_DVD_AUDIO 
static BOOL fgNonISODANextDlist(void) large 
{ 
  return ( fgDANextDlist()); 
}   
static BOOL fgNonISODAPrevDlist(void) large 
{ 
  return ( fgDAPrevDlist()); 
}   
static BOOL fgNonISODAHdnPasswordKey(void) large 
{ 
  return ( fgDAHdnPasswordKey() ); 
}   
#endif                  
 
 
// ********************************************************************* 
// Common key dispatch function 
// ********************************************************************* 
 
BOOL fgComKeyFunc(void) large 
{ 
  BOOL fgRet = UOP_OK; 
 
  switch (_bIRKey) 
  { 
/*  case IR_NUM0: */ 
/*  case IR_NUM1: */ 
/*  case IR_NUM2: */ 
/*  case IR_NUM3: */ 
/*  case IR_NUM4: */ 
/*  case IR_NUM5: */ 
/*  case IR_NUM6: */ 
/*  case IR_NUM7: */ 
/*  case IR_NUM8: */ 
/*  case IR_NUM9: */ 
/*  case IR_ADD10: */ 
/*  case IR_ADD20: */ 
/*  case IR_ADD5: */ 
 
#ifdef ENABLE_ZOOM_USER_MODE 
    case IR_UP: 
    case IR_LEFT: 
    case IR_RIGHT: 
    case IR_DOWN: 
      fgRet = fgCOMDirKey(); 
      break; 
#endif /* ENABLE_ZOOM_USER_MODE */ 
 
/*  case IR_ENTER: */ 
/*  case IR_PLAY:  */ 
/*  case IR_PAUSE: */ 
/*  case IR_STOP: */ 
/*  case IR_NEXT: */ 
/*  case IR_PREV: */ 
/*  case IR_REPEAT: */ 
/*  case IR_FF: */ 
/*  case IR_FR: */ 
/*  case IR_SF: */ 
/*  case IR_SR: */ 
/*  case IR_STEPF: */ 
/*  case IR_STEPR: */ 
/*  case IR_REVERSE: */ 
/*  case IR_SET_A: */ 
/*  case IR_SET_B: */ 
/*  case IR_TITLE_MENU: */ 
/*  case IR_ROOT_MENU: */ 
/*  case IR_RETURN: */ 
/*  case IR_NEXT_DLIST: */ 
/*  case IR_PREV_DLIST: */ 
/*  case IR_HOME_DLIST: */ 
/*  case IR_AUDIO: */ 
/*  case IR_SUB_TITLE: */ 
/*  case IR_SUB_TITLE_OFF: */ 
/*  case IR_ANGLE: */ 
/*  case IR_DISPLAY: */ 
/*  case IR_RESUME: */ 
/*  case IR_GOTO: */ 
/*  case IR_MARK: */ 
/*  case IR_CLEAR: */ 
/*  case IR_PBC: */ 
/*  case IR_DIGEST: */ 
/*  case IR_PROGRAM: */ 
/*  case IR_RANDOM: */ 
/*  case IR_VRMT: */ 
/*  case IR_MEMORY: */ 
/*  case IR_PLAY_MODE: */ 
 
    case IR_PAL_NTSC: 
      #if !defined(MT1379_MANUFACTURE_TEST) 
      fgRet = fgCOMTvFormatKey(); 
      #else 
      fgRet = TRUE; 
      #endif 
      break; 
 
/*  case IR_TV_MODE: */  /* handled in play_dvd.c */ 
 
    case IR_COMPONENT: 
      fgRet = fgCOMCompKey(); 
      break; 
 
#ifdef PSCAN_EN 
    case IR_PSCAN: 
      fgRet = fgCOMPScanKey(); 
      break; 
 
    case IR_VGA: 
      fgRet = fgCOMVGAKey(); 
      break; 
#endif 
 
/*  case IR_ZOOM_IN: */ 
/*  case IR_ZOOM_OUT: */ 
/*  case IR_ZOOM_USER: */ 
 
#ifdef SUPPORT_CAPTURE_LOGO 
    case IR_CAPTURE: 
      fgRet = fgCOMCaptureKey(); 
      break; 
#endif /* SUPPORT_CAPTURE_LOGO */ 
 
    case IR_AUD_KEY_PLUS: 
    case IR_AUD_KEY_MINUS: 
    case IR_AUD_KEY_RESUME: 
      fgRet = fgCOMAudKeyShift(); 
      break; 
 
    case IR_ECHO_PLUS: 
      fgRet = fgCOMEchoPlusKey(); 
      break; 
 
    case IR_ECHO_MINUS: 
      fgRet = fgCOMEchoMinusKey(); 
      break; 
 
#ifdef PLAYER_SURROUND 
    case IR_SURROUND: 
      fgRet = fgCOMSurroundKey(); 
      break; 
#endif       
 
    case IR_VOCAL_ASSIST: 
      fgRet = fgCOMVocalAssistKey(); 
      break; 
 
    case IR_KARAOKE: 
      fgRet = fgCOMKaraokeKey(); 
      break; 
 
    case IR_ECHO_TYPE: 
      fgRet = fgCOMEchoTypeKey(); 
      break; 
 
    case IR_EQUALIZER: 
      fgRet = fgCOMEqualizerKey(); 
      break; 
 
/*  case IR_VOICE_CANCEL: */ 
 
    case IR_SPK_CFG: 
      fgRet = fgCOMSpkCfgKey(); 
      break; 
 
/*  case IR_SPDIF: */ 
 
#ifdef SUPPORT_VOLUME_ADJUST 
    case IR_MUTE: 
      fgRet = fgCOMMuteKey(); 
      break; 
 
    case IR_VOLUME_UP: 
      fgRet = fgCOMVolumeUpKey(); 
      break; 
 
    case IR_VOLUME_DOWN: 
      fgRet = fgCOMVolumeDownKey(); 
      break; 
#endif 
 
    /* case IR_AUD_LR: */ 
 
    case IR_SETUP:   
      if((bSharedInfo(SI_INIT_STATE) == SV_LOADING_DISC) 
#if(defined(DVD_PROGRAM) || defined(VCD_PROGRAM) || defined(CDDA_PROGRAM))   
         || (_bInputState == INPUT_STATE_PROGRAM) 
#endif 
#ifdef PLAYER_BOOKMARK 
         || (_bInputState == INPUT_STATE_BOOKMARK) 
#endif 
        )     
      { 
        vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT); 
      	fgRet = UOP_OK; 
        break; 
      } 
      #if defined(MT1379_MANUFACTURE_TEST) 
      vInitMenuEntry(MENU_ITEM_DEFAULT); 
      fgRet = UOP_OK; 
      #else 
      if(!fgIsInSetupMenu()) 
      { 
        fgRet = fgCOMSetupKey(); 
      } 
      else 
      { 
        fgRet = UOP_OK; 
      } 
      #endif 
      break; 
 
/*  case IR_PLAY_TYPE: */ 
 
    case IR_OSD_LANGUAGE: 
      fgRet = fgCOMOsdLangKey(); 
      break; 
 
/*  case IR_DEFAULT: */ 
 
    case IR_GAME: 
      fgRet = fgCOMGameKey(); 
      break; 
 
    case IR_FUNCTION: 
      fgRet = fgCOMFunctionKey(); 
      break; 
 
    case IR_VFD_DARK: 
      fgRet = fgCOMVfdDark(); 
      break; 
 
    case IR_VFD_BRIGHT: 
      fgRet = fgCOMVfdBright(); 
      break; 
 
/*  case IR_VFD_MODE: */ 
 
    case IR_POWER: 
      fgRet = fgCOMPowerKey(); 
      break; 
 
    case IR_EJECT: 
      fgRet = fgCOMOpenCloseKey(); 
      break; 
 
/*  case IR_PLAY_PAUSE: */ 
/*  case IR_PAUSE_STEP: */ 
/*  case IR_STOP_RESUME: */ 
/*  case IR_PLAY_ENTER: */ 
/*  case IR_MENU_PBC: */ 
/*  case IR_TITLE_PBC: */ 
/*  case IR_CMD_DONE: */ 
/*  case IR_TIME_OUT: */ 
/*  case IR_DONE: */ 
/*  case IR_PASSWORD: */ 
      //fgRet = bCOMPasswordKey(); 
      //break; 
 
/*  case IR_UPG:  */ 
 
/*  case IR_SELECT_DONE: */ 
    default: 
       fgRet = UOP_OK; 
       break; 
  } 
 
  return (fgRet); 
} 
 
#ifndef SHRINK_KEYPROC 
// ********************************************************************* 
// Common key pre-handle function 
// ********************************************************************* 
BOOL fgComKeyProc(void) large 
{ 
  BOOL fgRet = UOP_OK; 
 
  /* handle multi-function key */ 
  if (fgIsMultiFuncKey(_bIRKey)) 
  { 
    fgRet = fgHandleMultiKey(); 
  } 
 
  /* execute non-stacked input state */ 
  if (_bIRKey != IR_NONE) 
  { 
    vNonStatckInputState(); 
  } 
 
   /* process common key */ 
  if (_bIRKey != IR_NONE) 
  { 
    fgRet = fgComKeyFunc(); 
  } 
 
  vResendInputState(); 
 
  return(fgRet); 
} 
#endif 
                  
// ********************************************************************* 
// Init(no disc) key dispatch function 
// ********************************************************************* 
BOOL fgInitKeyProc(void) large 
{                 
  BOOL fgRet = UOP_OK; 
                  
  /* process Init Key */ 
  if (_bIRKey < IR_KEY_MAX) 
  { 
    switch (_bIRKey) 
    { 
  /*  case IR_NUM0: */ 
  /*  case IR_NUM1: */ 
  /*  case IR_NUM2: */ 
  /*  case IR_NUM3: */ 
  /*  case IR_NUM4: */ 
  /*  case IR_NUM5: */ 
  /*  case IR_NUM6: */ 
  /*  case IR_NUM7: */ 
  /*  case IR_NUM8: */ 
  /*  case IR_NUM9: */ 
  /*  case IR_ADD10: */ 
  /*  case IR_ADD20: */ 
  /*  case IR_ADD5: */ 
  /*  case IR_UP:   */ 
  /*  case IR_LEFT:  */ 
  /*  case IR_RIGHT:  */ 
  /*  case IR_DOWN:  */ 
   
  /*  case IR_ENTER: */ 
      case IR_PLAY: 
        fgRet = bInitPlayKey(); 
        break; 
   
  /*  case IR_PAUSE: */ 
   
  #ifdef NO_DISC_STOP_CLEAR 
      case IR_STOP: 
        fgRet = bInitStopKey(); 
        break; 
  #endif 
   
  /*  case IR_NEXT: */ 
  /*  case IR_PREV: */ 
  /*  case IR_REPEAT: */ 
  /*  case IR_FF: */ 
  /*  case IR_FR: */ 
  /*  case IR_SF: */ 
  /*  case IR_SR: */ 
  /*  case IR_STEPF: */ 
  /*  case IR_STEPR: */ 
  /*  case IR_REVERSE: */ 
  /*  case IR_SET_A: */ 
  /*  case IR_SET_B: */ 
  /*  case IR_TITLE_MENU: */ 
  /*  case IR_ROOT_MENU: */ 
  /*  case IR_RETURN: */ 
  /*  case IR_NEXT_DLIST: */ 
  /*  case IR_PREV_DLIST: */ 
  /*  case IR_HOME_DLIST: */ 
  /*  case IR_AUDIO: */ 
  /*  case IR_SUB_TITLE: */ 
  /*  case IR_SUB_TITLE_OFF: */ 
  /*  case IR_ANGLE: */ 
  /*  case IR_DISPLAY: */ 
  /*  case IR_RESUME: */ 
  /*  case IR_GOTO: */ 
  /*  case IR_MARK: */ 
  /*  case IR_CLEAR: */ 
  /*  case IR_PBC: */ 
  /*  case IR_DIGEST: */ 
  /*  case IR_PROGRAM: */ 
  /*  case IR_RANDOM: */ 
  /*  case IR_VRMT: */ 
  /*  case IR_MEMORY: */ 
  /*  case IR_PLAY_MODE: */ 
   
  /*  case IR_PAL_NTSC: */ 
   
  /*  case IR_TV_MODE: */  /* handled in play_dvd.c */ 
   
  /*  case IR_COMPONENT: */ 
  /*  case IR_PSCAN:   */ 
  /*  case IR_VGA:  */ 
  /*  case IR_ZOOM_IN: */ 
  /*  case IR_ZOOM_OUT: */ 
  /*  case IR_ZOOM_USER: */ 
  /*  case IR_CAPTURE: */ 
  /*  case IR_AUD_KEY_PLUS: */ 
  /*  case IR_AUD_KEY_MINUS: */ 
  /*  case IR_AUD_KEY_RESUME: */ 
  /*  case IR_ECHO_PLUS: */ 
  /*  case IR_ECHO_MINUS: */ 
  /*  case IR_SURROUND: */ 
  /*  case IR_VOCAL_ASSIST: */ 
  /*  case IR_KARAOKE: */ 
  /*  case IR_ECHO_TYPE: */ 
  /*  case IR_EQUALIZER: */ 
  /*  case IR_VOICE_CANCEL: */ 
  /*  case IR_SPK_CFG:  */ 
  /*  case IR_SPDIF: */ 
  /*  case IR_MUTE:  */ 
  /*  case IR_VOLUME_UP: */ 
  /*  case IR_VOLUME_DOWN: */ 
  /*  case IR_AUD_LR: */ 
  /*  case IR_SETUP:  */ 
  /*  case IR_PLAY_TYPE: */ 
  /*  case IR_OSD_LANGUAGE: */ 
  /*  case IR_DEFAULT: */ 
  /*  case IR_GAME:  */ 
  /*  case IR_FUNCTION: */ 
  /*  case IR_VFD_DARK: */ 
  /*  case IR_VFD_BRIGHT: */ 
  /*  case IR_VFD_MODE: */ 
  /*  case IR_POWER: */ 
  /*  case IR_EJECT: */ 
  /*  case IR_PLAY_PAUSE: */ 
  /*  case IR_PAUSE_STEP: */ 
  /*  case IR_STOP_RESUME: */ 
  /*  case IR_PLAY_ENTER: */ 
  /*  case IR_MENU_PBC: */ 
  /*  case IR_TITLE_PBC: */ 
  /*  case IR_CMD_DONE: */ 
  /*  case IR_TIME_OUT: */ 
  /*  case IR_DONE: */ 
   
      case IR_PASSWORD: 
        fgRet = bInitPasswordKey(); 
        break; 
         
  /* case IR_HDN_PASSWORD:  */ 
   
      case IR_UPG: 
        fgRet = bInitUpgradeKey(); 
        break; 
   
  /*  case IR_SELECT_DONE: */ 
      default: 
         fgRet = UOP_OK; 
         break; 
    } 
  } 
  return (fgRet); 
} 
// ********************************************************************* 
// ISO(data disc, picture cd) key dispatch function 
// ********************************************************************* 
BOOL fgISOKeyProc(void) large 
{ 
  BOOL fgRet = UOP_OK; 
   
  if (fgFsMenuState()) 
  { 
    return (UOP_OK); 
  } 
   
  if ( _bIRKey >= IR_KEY_MAX ) 
  { 
    return (UOP_OK); 
  }    
   
//#ifndef CDDA_USE_CDFS   
  switch (_bIRKey) 
  { 
    case IR_NUM0: 
    case IR_NUM1: 
    case IR_NUM2: 
    case IR_NUM3: 
    case IR_NUM4: 
    case IR_NUM5: 
    case IR_NUM6: 
    case IR_NUM7: 
    case IR_NUM8: 
    case IR_NUM9: 
#ifndef NO_ADD10_KEY 
    case IR_ADD10: 
#endif 
// megaa ADD5 begin 
#ifndef NO_ADD5_KEY 
    case IR_ADD5: 
#endif 
// megaa ADD5 end 
      fgRet = fgISONumKey(); 
      break; 
 
/*  case IR_ADD20: */ 
/*  case IR_ADD5: */ 
 
    case IR_UP: 
    case IR_LEFT: 
    case IR_RIGHT: 
    case IR_DOWN: 
   // case IR_ENTER: 
      fgRet = fgISODirKey(); 
      break; 
 
    case IR_PLAY: 
      fgRet = fgISOPlayKey(); 
      break; 
 
    case IR_PAUSE: 
      if ( fgIsIsoPlay() ) 
      { 
        fgRet = fgISOPauseKey(); 
      } 
#ifdef SUPPORT_PCD 
      else if ( fgIsPcdPlay() ) 
      { 
        fgRet = fgPCDPauseKey(); 
      } 
#endif 
      break; 
 
    case IR_STOP: 
      fgRet = fgISOStopKey(); 
      break; 
 
    case IR_NEXT: 
      fgRet = fgISONextKey(); 
      break; 
 
    case IR_PREV: 
      fgRet = fgISOPrevKey(); 
      break; 
 
    case IR_REPEAT: 
      if ( fgIsIsoPlay() ) 
      { 
        fgRet = fgISORepeatKey(); 
      } 
#ifdef SUPPORT_PCD 
      else if ( fgIsPcdPlay() ) 
      { 
        fgRet = fgPCDRepeatKey(); 
      }     
#endif 
      break; 
 
    case IR_RESUME: 
      fgRet = fgISOResumeKey(); 
      break; 
 
    case IR_FF: 
      if ( fgIsIsoPlay() ) 
      { 
        fgRet = fgISOFFKey(); 
      } 
#ifdef SUPPORT_PCD 
      else if ( fgIsPcdPlay() ) 
      { 
        fgRet = fgPCDFFKey(); 
      } 
#endif 
      break; 
 
    case IR_FR: 
      if ( fgIsIsoPlay() ) 
      { 
        fgRet = fgISOFRKey(); 
      } 
#ifdef SUPPORT_PCD 
      else if ( fgIsPcdPlay() ) 
      { 
        fgRet = fgPCDFRKey(); 
      } 
#endif 
      break; 
 
#ifndef DISABLE_SF 
    case IR_SF: 
      fgRet = fgISOSFKey(); 
      break; 
#endif       
 
 
#ifdef PLAYER_VRMT 
    case IR_VRMT: 
#endif   
/*  case IR_SR: */ 
    case IR_STEPF: 
      fgRet = fgISOStepFKey(); 
      break; 
 
    case IR_STEPR: 
      fgRet = fgISOStepRKey(); 
      break; 
     
/*  case IR_REVERSE: */ 
 
    case IR_SET_A: 
      fgRet = fgISOA2BKey(); 
      break; 
 
/*  case IR_SET_B: */ 
/*  case IR_TITLE_MENU: */ 
/*  case IR_ROOT_MENU: */ 
/*  case IR_RETURN: */ 
/*  case IR_NEXT_DLIST: */ 
/*  case IR_PREV_DLIST: */ 
/*  case IR_HOME_DLIST: */ 
    case IR_AUDIO: 
      fgRet = fgISOAudioKey(); 
      break; 
 
/*    case IR_SUB_TITLE:  */ 
 
 
/*  case IR_SUB_TITLE_OFF: */ 
    case IR_ANGLE: 
      fgRet = fgISOAngleKey(); 
      break; 
 
    case IR_DISPLAY: 
      if ( fgIsIsoPlay() ) 
      { 
        fgRet = fgISORemainKey(); 
      } 
#ifdef SUPPORT_PCD 
      else if ( fgIsPcdPlay() ) 
      { 
        fgRet = fgPCDDisplayKey(); 
      }     
#endif 
      break; 
 
/* case IR_REMAIN: */ 
 
    case IR_GOTO: 
      fgRet = fgISOSearchKey(); 
      break; 
 
    case IR_MARK: 
      fgRet = fgISOMarkKey(); 
      break; 
 
/*  case IR_CLEAR: */ 
/*  case IR_PBC: */ 
       
#ifdef PLAYER_DIGEST       
    case IR_DIGEST: 
      fgRet = fgISODigestKey(); 
      break; 
#endif       
 
    case IR_PROGRAM: 
      fgRet = fgISOProgramKey(); 
      break; 
 
    case IR_RANDOM: 
       if ( fgIsIsoPlay() ) 
       { 
         fgRet = fgISORepeatKey(); 
       } 
#ifdef SUPPORT_PCD 
       else if ( fgIsPcdPlay() ) 
       { 
         fgRet = fgPCDShuffleKey(); 
       }    
#endif 
       break; 
 
/*  case IR_INTRO: */ 
/*  case IR_MEMORY: */ 
/*  case IR_PLAY_MODE: */ 
/*  case IR_PAL_NTSC: */ 
/*  case IR_TV_MODE: */ 
/*  case IR_COMPONENT: */ 
/*  case IR_PSCAN: */ 
/*  case IR_VGA: */ 
    case IR_ZOOM_IN: 
      if ( fgIsIsoPlay() ) 
      { 
        fgRet = fgISOZoomInKey(); 
      } 
#ifdef SUPPORT_PCD 
      else if ( fgIsPcdPlay() ) 
      { 
        fgRet = fgPCDZoomInKey(); 
      }     
#endif 
      break; 
 
    case IR_ZOOM_OUT: 
      fgRet = fgISOZoomOutKey(); 
      break; 
 
#ifdef ENABLE_ZOOM_USER_MODE 
    case IR_ZOOM_USER: 
      fgRet = fgISOZoomUsrKey(); 
      break; 
#endif /* ENABLE_ZOOM_USER_MODE */ 
 
/*  case IR_AUD_KEY_PLUS: */ 
/*  case IR_AUD_KEY_MINUS: */ 
/*  case IR_AUD_KEY_RESUME: */ 
/*  case IR_ECHO_PLUS: */ 
/*  case IR_ECHO_MINUS: */ 
/*  case IR_SURROUND: */ 
/*  case IR_VOCAL_ASSIST: */ 
/*  case IR_KARAOKE: */ 
/*  case IR_ECHO_TYPE: */ 
/*  case IR_EQUALIZER: */ 
/*  case IR_VOICE_CANCEL: */ 
/*  case IR_SPK_BALANCE: */ 
/*  case IR_SPDIF: */ 
/*  case IR_MUTE: */ 
/*  case IR_VOLUME_UP: */ 
/*  case IR_VOLUME_DOWN: */ 
/*  case IR_AUD_LR: */ 
 
    default: 
       vOsdShowError(SV_ERR_DISC_NOT_SUPPORT, OSD_TIMEOUT_SHORT); 
       fgRet = UOP_OK; 
       break; 
  }   
  return (fgRet); 
//#endif /* CDDA_USE_CDFS */   
}   
 
// ********************************************************************* 
// NonISO(DVD,VCD,CDDA,AUDIO_IN) key dispatch function 
// ********************************************************************* 
BOOL fgNonISOKeyProc(void) large 
{ 
  BOOL fgRet = UOP_OK; 
   
  switch (_bIRKey) 
  { 
    case IR_NUM0: 
    case IR_NUM1: 
    case IR_NUM2: 
    case IR_NUM3: 
    case IR_NUM4: 
    case IR_NUM5: 
    case IR_NUM6: 
    case IR_NUM7: 
    case IR_NUM8: 
    case IR_NUM9: 
#ifndef NO_ADD10_KEY 
    case IR_ADD10: 
#endif 
// megaa ADD5 begin 
#ifndef NO_ADD5_KEY 
    case IR_ADD5: 
#endif 
// megaa ADD5 end 
      fgRet = fgNonISONumKey(); 
      break; 
 
/*  case IR_ADD20: */ 
/*  case IR_ADD5: */ 
 
    case IR_UP: 
    case IR_LEFT: 
    case IR_RIGHT: 
    case IR_DOWN: 
      fgRet = fgNonISODirKey(); 
      break; 
 
    case IR_ENTER: 
      fgRet = fgNonISOEnterKey(); 
      break; 
 
    case IR_PLAY: 
      fgRet = fgNonISOPlayKey(); 
      break; 
 
    case IR_PAUSE: 
      fgRet = fgNonISOPauseKey(); 
      break; 
 
    case IR_STOP: 
      fgRet = fgNonISOStopKey(); 
      break; 
 
    case IR_NEXT: 
      fgRet = fgNonISONextKey(); 
      break; 
 
    case IR_PREV: 
      fgRet = fgNonISOPrevKey(); 
      break; 
 
    case IR_REPEAT: 
      fgRet = fgNonISORepeatKey(); 
      break; 
 
    case IR_RESUME: 
      fgRet = fgNonISOResumeKey(); 
      break; 
 
    case IR_FF: 
      fgRet = fgNonISOFFKey(); 
      break; 
 
    case IR_FR: 
      fgRet = fgNonISOFRKey(); 
      break; 
 
#ifndef DISABLE_SF 
    case IR_SF: 
      fgRet = fgNonISOSFKey(); 
      break; 
#endif       
 
#ifndef DISABLE_SR 
    case IR_SR: 
      fgRet = fgNonISOSRKey(); 
      break; 
#endif       
 
    case IR_STEPF: 
      fgRet = fgNonISOStepFKey(); 
      break; 
 
    case IR_STEPR: 
      fgRet = fgNonISOStepRKey(); 
      break; 
 
/* case IR_REVERSE: */ 
 
    case IR_SET_A: 
      fgRet = fgNonISOA2BKey(); 
      break; 
 
/* case IR_SET_B: */ 
 
    case IR_TITLE_MENU: 
      fgRet = fgNonISOTitleKey(); 
      break; 
 
    case IR_ROOT_MENU: 
      fgRet = fgNonISOMenuKey(); 
      break; 
 
    case IR_RETURN: 
      fgRet = fgNonISOReturnKey(); 
      break; 
 
#ifdef SUPPORT_DVD_AUDIO 
    case IR_NEXT_DLIST: 
      fgRet = fgNonISODANextDlist(); 
      break; 
 
    case IR_PREV_DLIST: 
      fgRet = fgNonISODAPrevDlist(); 
      break; 
 
/*  case IR_HOME_DLIST: */ 
#endif /* SUPPORT_DVD_AUDIO */ 
 
    case IR_AUDIO: 
      fgRet = fgNonISOAudioKey(); 
      break; 
 
    case IR_SUB_TITLE: 
      fgRet = fgNonISOSpKey(); 
      break; 
 
/* case IR_SUB_TITLE_OFF: */ 
 
    case IR_ANGLE: 
      fgRet = fgNonISOAngleKey(); 
      break; 
 
    case IR_DISPLAY: 
      fgRet = fgNonISODisplayKey(); 
      break; 
 
/* case IR_REMAIN: */ 
 
    case IR_GOTO: 
#ifdef GOTO_SEPARATE_KEY 
      fgRet = fgNonISOSearchKey(FALSE);  // enter original search interface 
      break; 
    case GOTO_SEPARATE_KEY:         // separate key for entering Goto 
      fgRet = fgNonISOSearchKey(TRUE); 
      break; 
#else 
      fgRet = fgNonISOSearchKey(TRUE);   // enter combined original search and new Goto 
      break; 
#endif 
 
#ifdef PLAYER_BOOKMARK 
    case IR_MARK: 
      fgRet = fgNonISOMarkKey(); 
      break; 
#endif       
 
/* case IR_CLEAR: */ 
    case IR_PBC:  
      fgRet = fgNonISOPbcKey(); 
      break; 
 
#ifdef PLAYER_DIGEST 
    case IR_DIGEST: 
      fgRet = fgNonISODigestKey(); 
      break; 
#endif       
 
#ifdef PLAYER_PROGRAM 
    case IR_PROGRAM: 
      fgRet = fgNonISOProgramKey(); 
      break; 
#endif 
 
    case IR_RANDOM: 
       fgRet = fgNonISOShuffleKey(); 
       break; 
 
 #ifdef PLAYER_VRMT 
    case IR_VRMT: 
       fgRet = fgNonISOVremoteKey(); 
       break; 
 #endif /* PLAYER_VRMT */ 
 
#ifdef MEMORY_SUPPORT 
    case IR_MEMORY: 
      fgRet = fgNonISOMemoryKey(); 
      break; 
#endif /* MEMORY_SUPPORT */ 
 
/* case IR_PLAY_MODE: */ 
/* case IR_PAL_NTSC: */ 
    case IR_TV_MODE: 
      fgRet = fgNonISOTvModeKey(); 
      break; 
 
/* case IR_COMPONENT: */ 
/* case IR_PSCAN: */ 
/* case IR_VGA: */ 
    case IR_ZOOM_IN: 
      fgRet = fgNonISOZoomInKey(); 
      break; 
 
#ifndef DISABLE_ZOOM_OUT 
    case IR_ZOOM_OUT: 
      fgRet = fgNonISOZoomOutKey(); 
      break; 
#endif       
 
#ifdef ENABLE_ZOOM_USER_MODE 
    case IR_ZOOM_USER: 
      fgRet = fgNonISOZoomUsrKey(); 
      break; 
#endif /* ENABLE_ZOOM_USER_MODE */ 
 
#ifdef SUPPORT_DVD_AUDIO 
   case IR_AUD_KEY_PLUS:  
     fgSetPlayPostKey(IR_NEXT_DLIST); 
     break; 
   case IR_AUD_KEY_MINUS:  
     fgSetPlayPostKey(IR_PREV_DLIST); 
     break; 
#endif    
/* case IR_AUD_KEY_RESUME: */ 
/* case IR_ECHO_PLUS: */ 
/* case IR_ECHO_MINUS: */ 
/* case IR_SURROUND: */ 
/* case IR_VOCAL_ASSIST: */ 
/* case IR_KARAOKE: */ 
/* case IR_ECHO_TYPE: */ 
/* case IR_EQUALIZER: */ 
/* case IR_VOICE_CANCEL: */ 
/* case IR_SPK_BALANCE: */ 
/* case IR_SPDIF: */ 
/* case IR_MUTE: */ 
/* case IR_VOLUME_UP: */ 
/* case IR_VOLUME_DOWN: */ 
/* case IR_AUD_LR: */ 
 case IR_FUNCTION:  
    fgRet = fgNonFunctionKey(); 
    break; 
     
 case IR_PASSWORD:  
    fgRet = fgNonISOPasswordKey(); 
    break; 
 
#ifdef SUPPORT_DVD_AUDIO 
    case IR_HDN_PASSWORD: 
      fgRet = fgNonISODAHdnPasswordKey(); 
      break; 
#endif 
 
    default: 
       vOsdShowError(SV_ERR_DISC_NOT_SUPPORT, OSD_TIMEOUT_SHORT); 
       fgRet = UOP_OK; 
       break; 
  }   
  return (fgRet); 
}   
 
#ifndef SHRINK_KEYPROC 
// ********************************************************************* 
// Screen saver key dispatch function 
// ********************************************************************* 
BOOL fgSCRSAVKeyProc(void ) large 
{ 
  BYTE bScrSaverSwitch; 
  //DBGLogB(_bIRKey,7,7,7); 
  //DBGLogS("SCR STATE\n"); 
   
  if (_bIRKey < IR_INTERNAL_KEY_START) 
  { 
    /* if we turned on the screen saver */ 
    bScrSaverSwitch = bEepromReadByte(SCR_SAVER_POSITION); 
    if (bScrSaverSwitch == EV_ON) 
    { 
      vBmpScrSaveExit(); 
    } 
    /* enter power active mode */ 
    vSendPlayerActive(); 
    vScrSaverSetTimeOut(SCR_SAVER_TIMEOUT); 
    //DBGLogS("Scrs EXIT\n"); 
 
    if (fgIsHiPriorityKey(_bIRKey) || (bScrSaverSwitch != EV_ON)) 
    { 
      /* we need to process the first key */ 
      fgSetPlayPostKey(_bIRKey); 
    } 
    _bIRKey = IR_NONE; 
    return UOP_OK; 
  } 
  else /* don't care internal key */ 
  { 
    return UOP_OK; 
  } 
}   
#endif