⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keyproc.c

📁 MTK portableDVD 采用mtk1389方案的代码
💻 C
📖 第 1 页 / 共 4 页
字号:

    case IR_SPK_CFG:
      fgRet = fgCOMSpkCfgKey();
      break;

/*  case IR_SPDIF: */

#ifdef SUPPORT_VOLUME_ADJUST
    case IR_MUTE:
      fgRet = fgCOMMuteKey();
      break;

    case IR_VOLUME_UP:
	#ifdef VOL_CTRL_AUXIN
	if(bVedioIn)
	fgRet = fgCOMAUXVolumeUpKey();
	else
	#endif
      	fgRet = fgCOMVolumeUpKey();
      break;

    case IR_VOLUME_DOWN:
	#ifdef VOL_CTRL_AUXIN
	if(bVedioIn)
	fgRet = fgCOMAUXVolumeDownKey();
	else
	#endif
      fgRet = fgCOMVolumeDownKey();
      break;
#endif

    /* case IR_AUD_LR: */

    case IR_SETUP:
      if(!fgIsInSetupMenu() && (bSharedInfo(SI_INIT_STATE)!=SV_LOADING_DISC) 
	#ifdef DL339_MENU
		&& _fgInBBKMenuMode == 0
	#endif
		 )
      {
        fgRet = fgCOMSetupKey();
      }
      else
      {
        _bIRKey = IR_NONE;
        fgRet = UOP_OK;
      }
      break;

    case IR_OSD_LANGUAGE:
      fgRet = fgCOMOsdLangKey();
      break;

/*  case IR_DEFAULT: */

#ifdef T100_SHIFT
 #ifndef DL389
    case IR_GAME:
      fgRet = fgCOMGameKey();
      break;
 #endif
#endif

#if defined( AUDIO_IN_EN) || defined(PORTABLEDVD)
    case IR_FUNCTION:
      fgRet = fgCOMFunctionKey();
      break;
#endif

#ifdef PORTABLEDVD
	case IR_SHIFT:
	  fgRet = fgCOMShiftKey();
	  break;
#endif

/*
#ifndef NO_VFD_ADJUST
    case IR_VFD_DARK:

#ifdef DIGITAL_VOLUME
		BBKSetVolume(FALSE);
		_bIRKey = IR_NONE;
		fgRet = UOP_OK;
#else
		fgRet = fgCOMVfdDark();
#endif
      break;

    case IR_VFD_BRIGHT:
#ifdef DIGITAL_VOLUME
		BBKSetVolume(TRUE);
		_bIRKey = IR_NONE;
		fgRet = UOP_OK;
#else
		  fgRet = fgCOMVfdBright();
#endif
      break;
#endif
*/
/*  case IR_VFD_MODE: */
#ifdef EASY_SWITCH_CHANNEL
		case IR_VFD_MODE:
		fgRet = bNONChannelKey();
			break;
#endif
/*  case IR_VFD_MODE: */

    case IR_POWER:
      fgRet = fgCOMPowerKey();
      break;

    case IR_EJECT:
     #ifdef GUI_DC_SELECT
        if(_bDevType == DEVICE_USB||_bDevType == DEVICE_CARD)
        {
          _bIRKey = IR_NONE;
          fgRet = UOP_OK;
          break;
        }
        else	
     #endif
      fgRet = fgCOMOpenCloseKey();
    #ifdef SUPPORT_HDVD_CHANNEL_CHANGE
       fgHDVDChannel=0;
    #endif
      break;

#ifdef SCREENSAVE_KEY
case IR_SCREENSAVE:
      fgRet = fgCOMScrSaveKey();
      break;
#endif
/*  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: */
#ifdef DL339_MENU
		case IR_GAME:

			if( bSharedInfo(SI_INIT_STATE) == SV_LOADING_DISC || (_bTrayStatus == TRAY_ST_MIDDLE))
			{
				_bIRKey = IR_NONE;
				return UOP_OK;
			}

			if(fgIsInSetupMenu())
			{
				_bIRKey = IR_NONE;
				return UOP_OK;
			}

			if( _bDCTimer)
			{
				_bIRKey = IR_NONE;
				return UOP_OK;
			}

			if(_fgInBBKMenuMode == 0 && _fgInPictureMode == TRUE)
			{
				_bPictureMode1 = 0xff;
				_fgInPictureMode = FALSE;
				//_bBBKMenuMode = 0;
			}

			if(_fgInBBKMenuMode == 0)
			{
				_fgInBBKMenuMode = 1;
			}
			else if(_fgInBBKMenuMode == 1)
			{
				_fgInBBKMenuMode = 2;
			}

		  fgRet = BBKNONPictureQKey();
		  break;
#endif

#ifdef DL333_T100_PIC
		case IR_PICTURE_Q:
	#ifdef DL339_MENU
	   if( _fgInBBKMenuMode )
	   {
		_bPictureMode1 = 0xff;
		_fgInPictureMode = FALSE;
		_fgInBBKMenuMode = 0;
	   }
	#endif
	#ifdef DIRECT_Adjust_VCOM			
  	       if(VCOM_ENTER_EN==0xff)	 
	      {
		   	VCOM_ENTER_EN=0;
  	       }
	      if(VCOM_ENTER_EN==0x0f)
	      {
	      		VCOM_ENTER_EN=0;
		 	BBKOsdShowPictureQ(0,0,0, 0);
	      }

	#endif	   	
		  fgRet = BBKNONPictureQKey();
		  break;

	case IR_LEFT:
	case IR_RIGHT:
#if defined(DL333_T100_T)|| defined(DIRECT_Adjust_VCOM)
	case IR_UP:
	case IR_DOWN:
	//case IR_STOP:
#endif
#if defined(DL339_MENU)
	case IR_UP:
	case IR_DOWN:
	case IR_VFD_MODE:
		if( _rUI.bState == UI_RUN )
		{
			if( bSharedInfo(SI_INIT_STATE) == SV_LOADING_DISC || (_bTrayStatus == TRAY_ST_MIDDLE))
			{
				_bIRKey = IR_NONE;
				return UOP_OK;
			}
		}
#endif
#if  defined(DIRECT_Adjust_VCOM)
	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_RETURN:
     switch(bVCOMPassWord)
     {
     	case 0:
	 	 if(_bIRKey ==IR_NUM4)
	 	 {
	 	  	bVCOMPassWord=1;
	 	 }
		 else
		 {
		  	bVCOMPassWord=0;
		 }
		 break;
	 
	case 1:
	 	 if(_bIRKey ==IR_NUM5)
	 	 {
	 	      bVCOMPassWord=2;
	 	 }
		 else
		 {
		  	bVCOMPassWord=0;
		 }
		 break;
		 
	case 2:
	 	 if(_bIRKey ==IR_NUM6)
	 	 {
	 	      bVCOMPassWord=3;
	 	 }
		 else
		 {
		  	bVCOMPassWord=0;
		 }
		 break;
		 
	case 3:
	 	 if(_bIRKey ==IR_NUM8)
	 	 {
	 	      VCOM_ENTER_EN=0xff;
		     bVCOMPassWord = 4;
	 	 }
		 else
		 {
		  	bVCOMPassWord=0;
		 }
		 break;
	 
	default:
		bVCOMPassWord=0;

		break;	
	 	
     }
#endif
		fgRet = BBKNONPictureDirKey();
		break;
#endif

#ifdef DL333_T100
		case IR_SPDIF:
		  BBKDummy();
		  fgRet = UOP_OK;
		  break;
#endif

    default:
       fgRet = UOP_OK;
       break;
  }

  return (fgRet);
}


// *********************************************************************
// 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);
}
                 
// *********************************************************************
// 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);
  }   
  
  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:
    {
			if((fgIsPcdPlay() && (bSharedInfo(SI_ZOOM_SWITCH) == SV_ZOOM_OFF)) ||   //100 means 100%
				 (fgIsIsoPlay() && (bSharedInfo(SI_ZOOM_SWITCH) == SV_ZOOM_OFF)))
			{
				fgRet = fgISOPrevKey();
				break;
			}
    }	
    case IR_DOWN:
    {
			if((fgIsPcdPlay() && (bSharedInfo(SI_ZOOM_SWITCH) == SV_ZOOM_OFF)) ||
				 (fgIsIsoPlay() && (bSharedInfo(SI_ZOOM_SWITCH) == SV_ZOOM_OFF)))
			{
				fgRet = fgISONextKey();
				break;
			}
    }	
    case IR_LEFT:
    case IR_RIGHT:
    case IR_ENTER:
      fgRet = fgISODirKey();
      break;

    case IR_PLAY:
      fgRet = fgISOPlayKey();
      break;

    case IR_PAUSE:
      if ( fgIsIsoPlay() )
      {
        fgRet = fgISOPauseKey();
      }
      else if ( fgIsPcdPlay() )
      {
        fgRet = fgPCDPauseKey();
      }    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -