📄 keyproc.c
字号:
((bSharedInfo(SI_CMD_CNT) == 0)
&& (bSharedInfo(SI_MPV_PAUSE) == 1)) // Wait for SI_MPV_PAUSE == 1, so that RISC is really paused
&& (!_fgSetupProhibit))
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);
}
}
#endif
}
#ifndef CDDA_USE_CDFS
else if ( fgIsCddaPlay())
{
return (fgCDDAMarkKey());
}
#endif
else
{
// return (UOP_OK);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
//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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#endif
#ifdef PLAYER_PROGRAM
static BOOL fgNonISOProgramKey(void) large
{
if(bSharedInfo(SI_CMD_CNT))
{
return (UOP_OK);
}
if( 0
#ifdef DVD_PROGRAM
|| fgIsDvdPlay()
#endif
#ifdef VCD_PROGRAM
|| fgIsVcdPlay()
#endif
#ifdef CDDA_PROGRAM
|| fgIsCddaPlay()
#endif
)
{
#if (DRAM_SZ != DRAM_2M) && !defined(USE_DRAM_CFG1)
vChangeInputState(INPUT_STATE_PROGRAM, FALSE);
#else
// 20050428, PL00000724, if entering program or bookmark, don't accept key again
// 20050623, PL00001170, there's a case that SI_PBC_STATE is SV_PLAY and SH_PAUSE_SHOW_WB != 0.
// We should also prohibit the key
if (bSharedInfo(SH_PAUSE_SHOW_WB) != 0)
return UOP_FAIL ;
if((bSharedInfo(SI_PBC_STATE) == SV_PAUSE) || fgIsVcdCddaTrk()
#ifdef CDDA_PROGRAM
|| fgIsCddaPlay()
#endif
)
{
if ((fgIsVcdCddaTrk()
#ifdef CDDA_PROGRAM
|| fgIsCddaPlay()
#endif
)
|| ((bSharedInfo(SI_CMD_CNT) == 0)
&& (bSharedInfo(SI_MPV_PAUSE) == 1)) // Wait for SI_MPV_PAUSE == 1, so that RISC is really paused
&& (!_fgSetupProhibit))
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);
}
}
#endif
}
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);
#ifndef VCD_RANDOM_SUPPORT
if(fgIsVcdPlay())
return (UOP_FAIL);
#endif
#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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#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);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#endif
static BOOL fgNonFunctionKey(void) large
{
#ifdef AUDIO_IN_EN
if ( fgIsAinPlay() )
{
return ( fgAINFunctionKey() );
}
else
#endif
{
// return (UOP_OK);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
static BOOL fgNonISOPasswordKey(void) large
{
if ( fgIsDvdPlay() )
{
return ( fgDVDPasswordKey() );
}
else
{
// return (UOP_OK);
// 20050401, CR00002256, show prohibit for non-supported keys
return (UOP_FAIL);
}
}
#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 = UOP_OK;
#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;
#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;
/* 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: */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -