📄 setup_menu.c
字号:
* cSpeaker = 0, front speaker
* 1, centre speaker
* 2, surround speaker
* 3, subwoofer
* Out : None.
*
* Return : None.
*
* Desc : Enable or Disable choice options depending on Bass Management setting.
****************************************************************************************/
#ifdef D_SETUP_SPEAKER_SIZE
#ifndef D_CUSTOM__EnableDisableSpkrSzOptions
// TODO: Re-write this part, get rid of this function !!!!!
/***************************************************************************************/
STATIC void _EnableDisableSpkrSzOptions(MSO_OBJECT __NEAR* pThis, SPEAKER_INDEX cSpeaker)
{
MSO_LISTITEM __NEAR* pListItem = (MSO_LISTITEM __NEAR*)pThis;
BOOL bIsSpeakerConfigAllowed = FALSE;
// On ADP side, There is nothing to be done while speakers are set to S(front)L(center)L(surround)1(subwoofer).
// So we should disable it.
if (!(((SPEAKER_INDEX_FRONT == cSpeaker) ||(SPEAKER_INDEX_CENTER == cSpeaker) ||(SPEAKER_INDEX_SURROUND == cSpeaker))
&& (SPK_SIZE_SMALL == pListItem->moParam.mwValue)
&& (BASS_MANAGEMENT_OFF == CoreAPI_GetPsBassMgt())))
{
if (SPEAKER_INDEX_FRONT == cSpeaker)
bIsSpeakerConfigAllowed = AS_CheckAndUpdateSpeakers(pListItem->moParam.mwValue, currentSpeakers.mCenterSpk, currentSpeakers.mSurroundSpk,
currentSpeakers.mSubwoofer, NOT_UPDATE);
else if (SPEAKER_INDEX_CENTER == cSpeaker)
bIsSpeakerConfigAllowed = AS_CheckAndUpdateSpeakers(currentSpeakers.mFrontSpk, pListItem->moParam.mwValue, currentSpeakers.mSurroundSpk,
currentSpeakers.mSubwoofer, NOT_UPDATE);
else if (SPEAKER_INDEX_SURROUND == cSpeaker)
bIsSpeakerConfigAllowed = AS_CheckAndUpdateSpeakers(currentSpeakers.mFrontSpk, currentSpeakers.mCenterSpk, pListItem->moParam.mwValue,
currentSpeakers.mSubwoofer, NOT_UPDATE);
else if (SPEAKER_INDEX_SUBWOOFER == cSpeaker)
bIsSpeakerConfigAllowed = AS_CheckAndUpdateSpeakers(currentSpeakers.mFrontSpk, currentSpeakers.mCenterSpk, currentSpeakers.mSurroundSpk,
pListItem->moParam.mwValue, NOT_UPDATE);
}
if(!bIsSpeakerConfigAllowed)
MS_SET_LISTITEM_DISABLE(pListItem);
else
MS_CLEAR_LISTITEM_DISABLE(pListItem);
}
/***************************************************************************************/
#endif // D_CUSTOM__EnableDisableSpkrSzOptions
#endif //D_SETUP_SPEAKER_SIZE
/***************************************************************************************
* Function : _EnableDisableCentreDelayOptions
*
* In : pThis = Pointer to an item in the list of values.
* wSpeakerConfigIndex = Speaker Configuration Index value.
*
* Out : None.
*
* Return : None.
*
* Desc : Enable or Disable choice options depending on Speaker config.
****************************************************************************************/
#ifdef D_SETUP_SPEAKER_CENTER_CTRL
#ifndef D_CUSTOM__EnableDisableCentreDelayOptions
// TODO: Re-write this part, get rid of this function !!!!!
/***************************************************************************************/
STATIC void _EnableDisableCentreDelayOptions(MSO_OBJECT __NEAR* pThis, UINT16 wSpeakerConfigIndex)
{
MSO_LISTITEM __NEAR* pListItem = (MSO_LISTITEM __NEAR*)pThis;
// If no centre speaker present then disable any speaker delay setting.
if((SPK_NOT_PRESENT== SpeakersConfigTable[wSpeakerConfigIndex].mCenterSpk)
&& (pListItem->moParam.mwOsdMsgIndex == S_0P3M
||pListItem->moParam.mwOsdMsgIndex == S_0P6M
||pListItem->moParam.mwOsdMsgIndex == S_1M
||pListItem->moParam.mwOsdMsgIndex == S_1P4M
||pListItem->moParam.mwOsdMsgIndex == S_1P7M))
{
MS_SET_LISTITEM_DISABLE(pListItem);
}
else
MS_CLEAR_LISTITEM_DISABLE(pListItem);
}
/***************************************************************************************/
#endif // D_CUSTOM__EnableDisableCentreDelayOptions
#endif //D_SETUP_SPEAKER_CENTER_CTRL
/***************************************************************************************
* Function : _EnableDisableRearDelayOptions
*
* In : pThis = Pointer to an item in the list of values.
* wSpeakerConfigIndex = Speaker Configuration Index value.
*
* Out : None.
*
* Return : None.
*
* Desc : Enable or Disable choice options depending on Speaker config.
****************************************************************************************/
#ifdef D_SETUP_SPEAKER_REAR_CTRL
#ifndef D_CUSTOM__EnableDisableRearDelayOptions
// TODO: Re-write this part, get rid of this function !!!!!
/***************************************************************************************/
STATIC void _EnableDisableRearDelayOptions(MSO_OBJECT __NEAR* pThis, UINT16 wSpeakerConfigIndex)
{
MSO_LISTITEM __NEAR* pListItem = (MSO_LISTITEM __NEAR*)pThis;
// If no surround speakers present then disable any speaker delay setting.
if((SPK_NOT_PRESENT == SpeakersConfigTable[wSpeakerConfigIndex].mSurroundSpk)
&& (pListItem->moParam.mwOsdMsgIndex == S_1M
||pListItem->moParam.mwOsdMsgIndex == S_2M
||pListItem->moParam.mwOsdMsgIndex == S_3M
||pListItem->moParam.mwOsdMsgIndex == S_4M
||pListItem->moParam.mwOsdMsgIndex == S_5P1M))
{
MS_SET_LISTITEM_DISABLE(pListItem);
}
else
MS_CLEAR_LISTITEM_DISABLE(pListItem);
}
/***************************************************************************************/
#endif // D_CUSTOM__EnableDisableRearDelayOptions
#endif //D_SETUP_SPEAKER_REAR_CTRL
/***************************************************************************************
* Function : _EnableDisableTestToneOption
*
* In : pThis = Pointer to an item in the list of values.
* wSpeakerConfigIndex = Speaker Configuration Index value.
*
* Out : None.
*
* Return : None.
*
* Desc : Enable or Disable test tone options depending on speaker configuration.
****************************************************************************************/
#ifdef D_SETUP_PINK_NOISE
#ifndef D_CUSTOM__EnableDisableTestToneOptions
// TODO: Re-write this part, get rid of this function !!!!!
/***************************************************************************************/
STATIC void _EnableDisableTestToneOptions(MSO_OBJECT __NEAR* pThis, UINT16 wSpeakerConfigIndex)
{
MSO_LISTITEM __NEAR* pListItem = (MSO_LISTITEM __NEAR*)pThis;
#ifdef D_ENABLE_DOLBY_EX_SUPPORT
if(((SPK_NOT_PRESENT== SpeakersConfigTable[wSpeakerConfigIndex].mCenterSpk) && (pListItem->moParam.mwOsdMsgIndex == S_CENTER))
||(SPK_NOT_PRESENT== SpeakersConfigTable[wSpeakerConfigIndex].mSurroundSpk)
&& ((pListItem->moParam.mwOsdMsgIndex == S_LEFT_SURR) ||(pListItem->moParam.mwOsdMsgIndex == S_RIGHT_SURR))
|| (SW_NOT_PRESENT== SpeakersConfigTable[wSpeakerConfigIndex].mSubwoofer)
&& (pListItem->moParam.mwOsdMsgIndex == S_SUBWOOFER )
|| (DOLBY_EX_BS_SPEAKERS_NONE == CoreAPI_GetPsSurrBkSpkrs())
&& (( pListItem->moParam.mwOsdMsgIndex == S_BS_LEFT ) || ( pListItem->moParam.mwOsdMsgIndex == S_BS_RIGHT))
|| (DOLBY_EX_BS_SPEAKERS_1 == CoreAPI_GetPsSurrBkSpkrs())
&& (pListItem->moParam.mwOsdMsgIndex == S_BS_RIGHT))
#else // D_ENABLE_DOLBY_EX_SUPPORT
if(((SPK_NOT_PRESENT== SpeakersConfigTable[wSpeakerConfigIndex].mCenterSpk) && (pListItem->moParam.mwOsdMsgIndex == S_CENTER))
||(SPK_NOT_PRESENT == SpeakersConfigTable[wSpeakerConfigIndex].mSurroundSpk)
&& ((pListItem->moParam.mwOsdMsgIndex == S_LEFT_SURR) ||(pListItem->moParam.mwOsdMsgIndex == S_RIGHT_SURR))
||(SW_NOT_PRESENT== SpeakersConfigTable[wSpeakerConfigIndex].mSubwoofer)
&& (pListItem->moParam.mwOsdMsgIndex == S_SUBWOOFER))
#endif // D_ENABLE_DOLBY_EX_SUPPORT
{
MS_SET_LISTITEM_DISABLE(pListItem);
}
else
MS_CLEAR_LISTITEM_DISABLE(pListItem);
}
/***************************************************************************************/
#endif // D_CUSTOM__EnableDisableTestToneOptions
#endif //D_SETUP_PINK_NOISE
/***************************************************************************************
* Operation Handlers
****************************************************************************************/
/***************************************************************************************
* Function : _ListItemInitOperation
*
* In : pThis = Pointer to a MSO_LISTITEM object.
*
* lParam = Parameter associated with an MS_OP if any.
*
* Out : None.
*
* Return : None.
*
* Desc : Special initializations like disabling a value depending on the value of
* another parameter should be done here.
*
* CAUTION : Do not use MS_CLEAR_FOCUSABLE atttribute to disable an item. Use the
* MS_SET_LISTITEM_DISABLE attribute.
****************************************************************************************/
#ifndef D_CUSTOM__ListItemInitOperation
#pragma argsused
// TODO: Re-write this part, get rid of this function !!!!!
/***************************************************************************************/
STATIC void _ListItemInitOperation(MSO_OBJECT __NEAR* pThis, UINT32 lParam)
{
#if (defined(D_SETUP_SPEAKER_SIZE)| defined(D_SETUP_SPEAKER_CENTER_CTRL) | defined(D_SETUP_SPEAKER_REAR_CTRL) | defined(D_SETUP_PINK_NOISE))
MSO_LISTITEM __NEAR* pListItem = (MSO_LISTITEM __NEAR*)pThis;
MS_DESCRIPTOR* pChoiceDescriptor = (MS_DESCRIPTOR*)((MSO_VLIST __NEAR*)(pThis->mpParent))->moParam.mdwData;
#endif
#ifdef D_SETUP_BASS_MANAGEMENT
#ifdef D_SETUP_SPEAKER_SUBWOOFER
if (pChoiceDescriptor == &oSubwooferPresentParamDescriptor)
_EnableDisableSpkrSzOptions((MSO_OBJECT __NEAR*)pListItem, SPEAKER_INDEX_SUBWOOFER);
#endif
#ifdef D_SETUP_SPEAKER_SIZE
// Enable or Disable choice options depending on BM setting.
if (pChoiceDescriptor == &oFrontSpeakerSzParamDescriptor)
_EnableDisableSpkrSzOptions((MSO_OBJECT __NEAR*)pListItem, SPEAKER_INDEX_FRONT);
else if (pChoiceDescriptor == &oCentreSpeakerSzParamDescriptor)
_EnableDisableSpkrSzOptions((MSO_OBJECT __NEAR*)pListItem, SPEAKER_INDEX_CENTER);
else if (pChoiceDescriptor == &oSurroundSpeakerSzParamDescriptor)
_EnableDisableSpkrSzOptions((MSO_OBJECT __NEAR*)pListItem, SPEAKER_INDEX_SURROUND);
#endif
#endif
#ifdef D_SETUP_SPEAKER_CENTER_CTRL
if(pChoiceDescriptor == &oCentreSpeakerDelayDescriptor)
{
// Enable or Disable choice options depending on Speaker config.
_EnableDisableCentreDelayOptions((MSO_OBJECT __NEAR*)pListItem, CoreAPI_GetPsSpkrCfgIdx());
}
#endif
#ifdef D_SETUP_SPEAKER_REAR_CTRL
if(pChoiceDescriptor == &oRearSpeakerDelayDescriptor)
{
// Enable or Disable choice options depending on Speaker config.
_EnableDisableRearDelayOptions((MSO_OBJECT __NEAR*)pListItem, CoreAPI_GetPsSpkrCfgIdx());
}
#endif
#ifdef D_SETUP_PINK_NOISE
if(pChoiceDescriptor == &oPkNoiseTestToneParamDescriptor)
{
// Enable or Disable test tone options depending on speaker configuration.
_EnableDisableTestToneOptions((MSO_OBJECT __NEAR*)pListItem, CoreAPI_GetPsSpkrCfgIdx());
}
#endif //D_SETUP_PINK_NOISE
}
/***************************************************************************************/
#endif // D_CUSTOM__ListItemInitOperation
/***************************************************************************************
* Operation functions
****************************************************************************************/
/***************************************************************************************
* Function : _MenuOperation
*
* In : pThis = Pointer to the Setup Menu (MSO_MENU) object.
*
* MsOp = Operation ID.
*
* lParam = Parameter associated with an MS_OP if any.
*
* Out : None.
*
* Return : ID of the operation that is to be propagated once processing is done,
* otherwise MS_OP_NONE.
*
* Desc : This function processes all operations/events of the Setup Menu.
****************************************************************************************/
#ifndef D_CUSTOM__MenuOperation
/***************************************************************************************/
STATIC MS_OP _MenuOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
switch(MsOp)
{
case MS_OP_MENU:
case MS_OP_TITLE:
case MS_OP_RETURN:
case MS_OP_PBC:
case MS_OP_AUDIO:
case MS_OP_SUBTITLE:
case MS_OP_ANGLE:
case MS_OP_JPEG_ROTATION:
case MS_OP_PLAY_MODE:
case MS_OP_MARKAB:
case MS_OP_REPEAT:
case MS_OP_PROGRAM:
case MS_OP_SHUFFLE:
case MS_OP_INTRO_PLAY:
case MS_OP_SKIPB:
case MS_OP_SKIPF:
case MS_OP_FASTB:
case MS_OP_FASTF:
case MS_OP_SLOWF:
case MS_OP_SLOWB:
case MS_OP_STEPF:
case MS_OP_CHAPTER_MARKER_SKIP:
case MS_OP_BOOKMARK:
case MS_OP_PREV_INDEX:
case MS_OP_NEXT_INDEX:
case MS_OP_PAUSE:
case MS_OP_STOP:
case MS_OP_RESUME_STOP:
case MS_OP_KARAOKE:
case MS_OP_3D:
case MS_OP_LR:
case MS_OP_SIX_CHANNEL:
case MS_OP_MIC_ON_OFF:
case MS_OP_EQUALIZER:
case MS_OP_SPECTRUM:
case MS_OP_PROLOGIC:
case MS_OP_ZOOM:
case MS_OP_TV_SYS:
case MS_OP_VIDEO_OUTMODE:
case MS_OP_VIDEO_ENHANCE:
case MS_OP_PSO_MODE:
case MS_OP_HD_RESOLUTION:
case MS_OP_DISPLAY:
case MS_OP_MAESTROLINK:
case MS_OP_DIGEST:
case MS_OP_SEARCH:
case MS_OP_MPP:
case MS_OP_DD_EX:
case MS_OP_MUTE:
#ifndef D_UI_PLAY_CLOSES_SETUP
case MS_OP_PLAY:
case MS_OP_PLAY_PAUSE:
#endif//D_UI_PLAY_CLOSES_SETUP
#ifdef EZVIEW_ENABLED
case MS_OP_EZVIEW:
#endif
#ifdef D_DIRECT_KEY_SMART_PICTURE
case MS_OP_SMART_PICTURE:
#endif
return MS_OP_NONE;
case MS_OP_OPEN:
MS_CreateAndAddObject((MS_DESCRIPTOR *)&oSetupBookDescriptor, (MSO_CONTAINER __NEAR*)pThis);
break;
default:
break;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -