📄 keyproc.c
字号:
return (UOP_FAIL);
// return (UOP_OK);
}
}
static BOOL fgNonISOProgramKey(void) large
{
#ifdef PLAYER_PROGRAM
vChangeInputState(INPUT_STATE_PROGRAM, FALSE);
#else
vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
#endif
return (UOP_OK);
}
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
BYTE xdata _bVRmtCounter = 0;
#define TIMER_EXPIRE_LOCK_IR_VRMT 30
static BOOL fgNonISOVremoteKey(void) large
{
if( fgIsDvdPlay() )
{
#if (DRAM_SZ == DRAM_4M)
if (IR_VRMT != _bIRKey)
{
_bVRmtCounter = 0;
}
//if(!(_rOsdStateCtx.fgVRemoteShow) && ( (_bVRmtCounter == 0)))
if(_bVRmtCounter == 0)
{
_bVRmtCounter = TIMER_EXPIRE_LOCK_IR_VRMT;
return (fgDVDVremoteKey());
}
else
{
return (UOP_OK);
}
#else
return (fgDVDVremoteKey());
#endif
}
else if ( fgIsVcdPlay() )
{
return (fgVCDVremoteKey());
}
else
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// 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
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// return (UOP_OK);
}
}
static BOOL fgNonISOZoomInKey(void) large
{
if( fgIsDvdPlay() )
{
return (fgDVDZoomInKey());
}
else if ( fgIsVcdPlay() )
{
return (fgVCDZoomInKey());
}
else if ( fgIsCddaPlay())
{
return (fgCDDAZoomInKey());
}
else
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// return (UOP_OK);
}
}
static BOOL fgNonISOZoomOutKey(void) large
{
if( fgIsDvdPlay() )
{
return (fgDVDZoomOutKey());
}
else if ( fgIsVcdPlay() )
{
return (fgVCDZoomOutKey());
}
else if ( fgIsCddaPlay())
{
return (fgCDDAZoomOutKey());
}
else
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// return (UOP_OK);
}
}
#ifdef ENABLE_ZOOM_USER_MODE
static BOOL fgNonISOZoomUsrKey(void) large
{
if( fgIsDvdPlay() )
{
return (fgDVDZoomUsrKey());
}
else if ( fgIsVcdPlay() )
{
return (fgVCDZoomUsrKey());
}
else if ( fgIsCddaPlay())
{
return (fgCDDAZoomUsrKey());
}
else
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// return (UOP_OK);
}
}
#endif
static BOOL fgNonFunctionKey(void) large
{
#ifdef AUDIO_IN_EN
if ( fgIsAinPlay() )
{
return ( fgAINFunctionKey() );
}
else
#endif
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// 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
// *********************************************************************
BYTE xdata _bSetupCounter = 0;
#define TIMER_EXPIRE_LOCK_IR_SETUP 15
BOOL fgComKeyFunc(void) large
{
BOOL fgRet = UOP_OK;
//alfonso
if (_bIRKey != IR_SETUP)
{
_bSetupCounter = 0;
}
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:
fgRet = fgCOMTvFormatKey();
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;
case IR_SURROUND:
fgRet = fgCOMSurroundKey();
break;
case IR_VOCAL_ASSIST:
// by Alfonso, discussing with AlanCheng, that in ISO disc, using VRMT key to drive DRM info.
#ifdef SUPPORT_DRM
if (fgIsIsoPlay())
{
if(bSharedInfo(SI_JPG_TARGET)==SV_JPG_NORMAL) //luoqing,when digest menu(help),press v-mode,osd mess
{
vDRMRegCodeKey();
_bIRKey = IR_NONE;
}
return (UOP_OK);
}
else
#endif /*SUPPORT_DRM*/
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 (DRAM_SZ == DRAM_4M)
if(!fgIsInSetupMenu() && ( (_bSetupCounter == 0)))//alfonso
#else
if(!fgIsInSetupMenu() && ( (_bSetupCounter == 0) || !fgIsIsoPlay()))//alfonso
#endif
{
_bSetupCounter = TIMER_EXPIRE_LOCK_IR_SETUP;
fgRet = fgCOMSetupKey();
}
else
{
fgRet = UOP_OK;
}
break;
#ifdef SUPPORT_DRM
case IR_PLAY_TYPE:
vDRMRegCodeKey();
break;
#endif
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;
#ifdef SUPPORT_USB_COPY //yan 070409
case IR_USB_COPY:
fgRet =fgCOMUSBInputKey();
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: */
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: */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -