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

📄 setup_menu.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 5 页
字号:
#ifdef MULTIPLE_3D_EFFECT_CHOICE
STATIC void _3DEffectsParamAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif // MULTIPLE_3D_EFFECT_CHOICE

#ifdef D_SETUP_SPEAKER_CENTER_CTRL
STATIC void _CentreSpkrDelayParamAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif //D_SETUP_SPEAKER_CENTER_CTRL
#ifdef D_SETUP_SPEAKER_REAR_CTRL
STATIC void _RearSpkrDelayParamAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif //D_SETUP_SPEAKER_REAR_CTRL

#ifdef D_SETUP_SPEAKER_6CHANNEL_CTRL
STATIC UINT16 _SubwooferChDelaySliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _RightSurChDelaySliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _LeftSurChDelaySliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _RightChDelaySliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _CentreChDelaySliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _LeftChDelaySliderAction(HSLIDER_ACTION eType, UINT16 wValue);
#endif//D_SETUP_SPEAKER_6CHANNEL_CTRL

/***************************************************************************************
* 	Action functions of the Ratings parameters.
****************************************************************************************/
STATIC void _ParentalControlParamAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#ifdef D_VIDOUT_CONTROL_BY_HOTPLUG_ON_UI	//<<< ZJS_HN_0009G [112905] : Video out is controlled by hot plug on the ui side.
UINT16 Default_ScanMode = VID_OUT_YUV;
#endif //D_VIDOUT_CONTROL_BY_HOTPLUG_ON_UI	//>>> ZJS_HN_0009G [112905] : Video out is controlled by hot plug on the ui side.

/***************************************************************************************
* 	Include customization file.
****************************************************************************************/

// Include custom code file: customer specific code, over-writing common one.
#include "Custom\Setup\setup_menu_custom.c"
// Include configuration file: constants.
#include "Setup\setup_menu_config.c"


/***************************************************************************************
* 	Global functions
****************************************************************************************/
#ifdef D_SETUP_TV_SYSTEM_WARNING_MENU
#ifndef D_CUSTOM_TVSettingParamAction
/***************************************************************************************/
void TVSettingParamAction(MS_DESCRIPTOR* mpDescriptor, UINT16 wValue, BOOL bSaveFlag)
{
	UINT16 wSaveFlag = bSaveFlag? 0 : 0x8000;
	MSO_OBJECT __NEAR* pObject = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)gpScreen, mpDescriptor);

	if (pObject != NULL)
	{
		if (mpDescriptor == (MS_DESCRIPTOR*)&oTVSystemParamDescriptor)
		{
			CoreAPI_UpdatePlayerSetting(PS_UPDATE_TV_STANDARD | wSaveFlag, wValue);
			OSDAdaptDisplayRangeToVideoStandard();

			((MSO_CHOICE __NEAR*)pObject)->moParam.mwCurrValIndex = OCHOICE_GetIndexFromValue(pObject, wValue);
		}
#ifdef D_GUI_SETUP_VIDEO_OUT
		else if (mpDescriptor == (MS_DESCRIPTOR*)&oVideoOutParamDescriptor)
		{
			CoreAPI_UpdatePlayerSetting(PS_UPDATE_VID_OUT | wSaveFlag, wValue);
			// No condition, always re-display the whole menu
			//MS_MenuActiveSetOsdLayoutAndDisplay();
			MS_MenuActiveSetOsdLayoutAndDisplay();
			((MSO_CHOICE __NEAR*)pObject)->moParam.mwCurrValIndex = OCHOICE_GetIndexFromValue(pObject, wValue);
		}
#endif //D_GUI_SETUP_VIDEO_OUT
	}
}
/***************************************************************************************/
#endif // D_CUSTOM_TVSettingParamAction
#endif //D_SETUP_TV_SYSTEM_WARNING_MENU

/***************************************************************************************
*	Function	: 	SETUP_M_OSDMenuLanguageInit
*
*	In		: 	None.
*
*	Out		: 	None.
*
*	Return	:	None.
*
*	Desc 	:	Initializes the OSD menu language.
****************************************************************************************/
void SETUP_M_OSDMenuLanguageInit(void)	
{
	// TODO : Get the PS saved language and use LUT to translate into index for gCurrentLanguage
	STRINGS_SetCurrentLanguageIndex(STRINGS_GetLanguageIndexFromISO639(CoreAPI_GetPsOsdMenuLanguage()));
}


/***************************************************************************************
*	Function 	: 	_Layout
*
*	In		: 	None
*
*	Out		: 	TRUE if successful.
*
*	Desc 	:	Sets layout for the menu.
****************************************************************************************/
#ifndef D_CUSTOM__Layout
/***************************************************************************************/
STATIC BOOL _Layout(void)
{
#ifdef D_GINGER_I86
	go_CurrentLayout.m_bBigMemMap 	= 1;
#endif //D_GINGER_I86
#ifdef D_GINGER_I96
	go_CurrentLayout.m_bBigMemMap 	= OSD_LAYOUT_MEM_MAP_LARGE;
#endif //D_GINGER_I96
#ifdef D_CD_GRAPHIC_ENABLED
	go_CurrentLayout.m_bOSDBufferNum = OSD_BUFFER_0;
#endif//D_CD_GRAPHIC_ENABLED

	OSDAdaptPixResolutionToProgressive();

	OSDClearArea();
	OSDAddArea(&OsdLayoutArea);
	OSDSetLayout();
	OSDAdaptDisplayRangeToVideoStandard();
	return 1;
}
/***************************************************************************************/
#endif //D_CUSTOM__Layout

/***************************************************************************************
* 	Action functions of the Miscelleneous parameters.
****************************************************************************************/

/***************************************************************************************
*	Function	: 	_AddItemsAndResizeValueVList
*
*	In		: 	pList 	= 	Pointer to the parameter VList.
*				pChoice 	= 	The list of parameters.
*
*	Out		: 	None.
*
*	Return	:	TRUE if successful.
*
*	Desc 	:	Adds value items to the MSO_VLIST list (oValueListItemDescriptor), and resizes it
*				according to the number of items added. The number of items added depends on the
*				number of values available for the parameter represented by the pChoice object.
****************************************************************************************/
#ifndef D_CUSTOM__AddItemsAndResizeValueVList
/***************************************************************************************/
STATIC BOOL _AddItemsAndResizeValueVList(MSO_VLIST __NEAR* pList, MSO_CHOICE __NEAR* pChoice)
{
	BOOL bRetVal = FALSE;
	MSO_OBJECT __NEAR* pScrollList = (MSO_OBJECT __NEAR*)((MSO_OBJECT __NEAR*)pList)->mpParent;

	bRetVal = OCHOICE_AddItemsToVList(pChoice, pList);

	// Re-size the scroll list, and position it according to the location of pChoice.
	// ASSUMPTION : All items in the value vlist are of same height.
	if((TRUE == bRetVal) && (pList->moParam.mwTotalItems < pList->moParam.mcNumVisibleItems))
	{
		UINT16 wExcessHeight;
		UINT16 wChoiceHeight;
		MSO_OBJECT __NEAR* pParamVList = (MSO_OBJECT __NEAR*)pScrollList->mpParent;
		MS_DESCRIPTOR_CHOICE* pDescriptorChoice;
		MS_DESCRIPTOR_LISTITEM* pDescriptorListItem;

		pDescriptorChoice = (MS_DESCRIPTOR_CHOICE*)((MSO_OBJECT __NEAR*)pChoice)->mpDescriptor;
		pDescriptorListItem = (MS_DESCRIPTOR_LISTITEM*)(pDescriptorChoice->mpDescriptorValue);

		wExcessHeight = (((MS_DESCRIPTOR*)pDescriptorListItem)->moArea.mwH + pList->moParam.mcItemOffset)
						* (pList->moParam.mcNumVisibleItems - pList->moParam.mwTotalItems);

		// Resize the MSO_VSCROLL_LIST objects.
		pScrollList->moArea.mwH -= wExcessHeight;

		wChoiceHeight = ((MSO_OBJECT __NEAR*)pChoice)->moArea.mwH;

		while(((pScrollList->moArea.msY + pScrollList->moArea.mwH) < (pParamVList->moArea.msY + pParamVList->moArea.mwH))
				&& (pScrollList->moArea.msY < ((MSO_OBJECT __NEAR*)pChoice)->moArea.msY))
			pScrollList->moArea.msY += wChoiceHeight;

		pScrollList->moArea.msY -= wChoiceHeight;
	}
	return bRetVal;
}
/***************************************************************************************/
#endif // D_CUSTOM__AddItemsAndResizeValueVList

/***************************************************************************************
*	Function	: 	_AddParamsToVList
*
*	In		: 	pList 	= 	Pointer to the parameter VList.
*				pParam 	= 	The list of parameters.
*
*	Out		: 	None.
*
*	Return	:	TRUE if successful.
*
*	Desc 	:	Adds parameters to a page. The name/value for the items are taken from tables
*				corresponding to the page type(LANGUAGE Page /VIDEO Page etc.).
****************************************************************************************/
#ifndef D_CUSTOM__AddParamsToVList
/***************************************************************************************/
STATIC BOOL _AddParamsToVList(MSO_VLIST __NEAR* pList, CONST SETUP_PAGE_PARAM* pParam)
{
	if((NULL != pList) && (NULL != pParam))
	{
		UINT8 cIndex;
		UINT8 cNumItems;
		MS_DESCRIPTOR* pDescriptor;
		MSO_OBJECT __NEAR* pItem;

		pList->moParam.mwTotalItems = pParam->wNumParams;

		cNumItems = MIN(pList->moParam.mcNumVisibleItems, (pList->moParam.mwTotalItems - pList->moParam.mwFirstDisplayItem));

		for(cIndex = 0; cIndex < cNumItems; cIndex++)
		{
			pDescriptor = (MS_DESCRIPTOR*)pParam->mpParamDescriptorList[(pList->moParam.mwFirstDisplayItem + cIndex)];
			pItem = OVLIST_CreatAndAddItem((MSO_OBJECT __NEAR*)pList, pDescriptor, TRUE, FALSE);

			MS_SendOperation(pItem, MS_OP_OPEN, 0);
			MS_SendOperation(pItem, MS_OP_INIT, 0);
		}
		return TRUE;
	}
	return FALSE;
}
/***************************************************************************************/
#endif // D_CUSTOM__AddParamsToVList

/***************************************************************************************
*	Function	: 	_AddPageParams
*
*	In		: 	pPage	=	Pointer to the page.
*
*	Out		: 	None.
*
*	Return	:	TRUE if successful.
*
*	Desc 	:	Adds parameters to a page. The name/value for the items are taken from tables
*				corresponding to the page type(LANGUAGE Page /VIDEO Page etc.).
****************************************************************************************/
#ifndef D_CUSTOM__AddPageParams
/***************************************************************************************/
BOOL _AddPageParams(MSO_PAGE __NEAR* pPage)
{
	if(NULL != pPage)
	{
		MSO_OBJECT __NEAR* pScrollList;
		MSO_VLIST __NEAR* pList = (MSO_VLIST __NEAR*)MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pPage,
																		(MS_DESCRIPTOR*)&oParamVListDescriptor);
		ASSERT(NULL != pList);

		switch(pPage->moParam.mwPageIndex)
		{
		case PAGE_INDEX_LANGUAGE:
			_AddParamsToVList(pList, &aLanguageParams);
			break;
		case PAGE_INDEX_VIDEO:
			_AddParamsToVList(pList, &aVideoParams);
			break;
		case PAGE_INDEX_AUDIO:
			_AddParamsToVList(pList, &aAudioParams);
			break;
		case PAGE_INDEX_RATING:
			_AddParamsToVList(pList, &aRatingParams);
			break;
#ifdef TV_GUARDIAN_ENABLE
		case PAGE_INDEX_TVG:
			_AddParamsToVList(pList, &aTVGParams);
			break;
#endif //TV_GUARDIAN_ENABLE
#ifdef FTA_SUPPORT
		case PAGE_INDEX_FTA:
			_AddParamsToVList(pList, &aFTAParams);
			break;
#endif
		case PAGE_INDEX_MISC:
			_AddParamsToVList(pList, &aMiscParams);
			break;
		default:
			break;
		}

		// Add the value vscroll list.
		pScrollList = MS_CreateAndAddObject((MS_DESCRIPTOR*)&oValueVScrollListDescriptor, (MSO_CONTAINER __NEAR*)pList);

		MS_SendOperation(pScrollList, MS_OP_OPEN, 0);
		MS_SendOperation(pScrollList, MS_OP_INIT, 0);

		if(pPage->moParam.mwPageIndex == PAGE_INDEX_AUDIO)
		{
			// Used for checking the validity of the speaker configuration.
			// Set and update once all parameters has been set on screen.
			currentSpeakers.mFrontSpk = SpeakersConfigTable[CoreAPI_GetPsSpkrCfgIdx()].mFrontSpk;
			currentSpeakers.mCenterSpk = SpeakersConfigTable[CoreAPI_GetPsSpkrCfgIdx()].mCenterSpk;
			currentSpeakers.mSurroundSpk = SpeakersConfigTable[CoreAPI_GetPsSpkrCfgIdx()].mSurroundSpk;
			currentSpeakers.mSubwoofer = SpeakersConfigTable[CoreAPI_GetPsSpkrCfgIdx()].mSubwoofer;	
		}
		return TRUE;
	}
	return FALSE;
}
/***************************************************************************************/
#endif // D_CUSTOM__AddPageParams

/***************************************************************************************
*	Function	: 	_RestoreObjectPosition
*
*	In		: 	pThis	=	Pointer to object who's position needs to be restored.
*
*	Out		: 	None.
*
*	Return	:	None.
*
*	Desc 	:	Restores the original position, and size of a specified object.
****************************************************************************************/
// TODO: Add MS_ObjectRestoreArea to ms_object.c
#ifndef D_CUSTOM__RestoreObjectPosition
/***************************************************************************************/
STATIC void _RestoreObjectPosition(MSO_OBJECT __NEAR* pThis)
{
	if(NULL != pThis)
	{
		MS_DESCRIPTOR* pDescriptor = pThis->mpDescriptor;

		pThis->moArea.msX 		= pDescriptor->moArea.msX;
		pThis->moArea.msY 		= pDescriptor->moArea.msY;
		pThis->moArea.mwW 	= pDescriptor->moArea.mwW;
		pThis->moArea.mwH 	= pDescriptor->moArea.mwH;
	}
}
/***************************************************************************************/
#endif // D_CUSTOM__RestoreObjectPosition

/***************************************************************************************
*	Function	: 	_EnableDisableSpkrSzOption
*
*	In		: 	pThis	=	Pointer to an item in the list of values.

⌨️ 快捷键说明

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