📄 menufunc.c
字号:
UserPrefPhase=tempValue;
mStar_AdjustPhase(UserPrefPhase);
return TRUE;
}
WORD GetPhaseValue(void)
{ return GetScale100Value(UserPrefPhase, 0, 63);
//return UserPrefPhase;
}
Bool AdjustLanguage(MenuItemActionType action)
{ if (action==MIA_IncValue)
UserPrefLanguage+=1;
else
UserPrefLanguage+=(LANG_Nums-1);
UserPrefLanguage%=LANG_Nums;
return TRUE;
}
Bool AdjustOSDPosition(MenuItemActionType action)
{ if (action==MIA_IncValue)
UserPrefOsdHStart+=1;
else
UserPrefOsdHStart+=4;
UserPrefOsdHStart%=5;
Osd_Hide();
Osd_SetPosition(UserPrefOsdHStart, UserPrefOsdVStart);
Osd_Show();
return TRUE;
}
#if QuantaGateway
Bool AdjustInputSelect(MenuItemActionType action)
{
action=action;
Power_TurnOffPanel();//barry1027 switch appear garbage
SrcInputType=(SrcInputType+1)%Input_Nums;
printData("SrcInputType = %d", SrcInputType); //ASW mask
mStar_SetupInputPort();
if (SrcInputType==Input_Digital)
mStar_AutoDVI(); //do auto tracking DVI
return TRUE;
}
#endif
Bool AutoConfig(void)
{ Bool result;
if (SrcInputType==Input_Digital)
return FALSE;
result=mStar_AutoGeomtry();
UserPrefAutoHStart=UserPrefHStart;
UserPrefAutoVStart=UserPrefVStart; //jon add modify after auto the HV position set 50/50
if (result)
{ printMsg("UserPrefAutoTimes=1");
UserPrefAutoTimes=1;
mStar_AutoColor();
SaveModeSetting();
}
return result;
}
Bool ModeInfoOnOff(void)
{
if (ModeInfoOnFlag)
Clr_ModeInfoOnFlag();
else
Set_ModeInfoOnFlag();
Set_SaveSettingFlag();
return TRUE;
}
Bool Reset(void)
{
UserPrefContrast=DefContrast;
UserPrefBrightness=DefBrightness;
UserPrefVolume=DefVolume;
UserPrefColorTemp=CTEMP_6500K;
UserPrefColorTemp1=UserPrefColorTemp;
UserPrefOsdTime=20;
UserPrefOsdHStart=2;
mStar_AdjustBrightness(UserPrefBrightness);
mStar_AdjustContrast(UserPrefContrast);
mStar_AdjustVolume(UserPrefVolume);
Osd_SetPosition(UserPrefOsdHStart, UserPrefOsdVStart);
Clr_ModeInfoOnFlag();
Osd_DrawStr(18, 5, OSDPositionIcon());
Osd_DrawStr(18, 6, ModeInfoOnOffText());
AutoConfig();
Clear_NVRam_All_ModeSetting();
SaveModeSetting();
SaveMonitorSetting();
// close OSD
MenuPageIndex=RootMenu;
MenuItemIndex=0;
OsdCounter=0;
Osd_Hide();
return TRUE;
}
void SaveUserPref(void)
{ SaveMonitorSetting();
if (SrcInputType<Input_Digital)
SaveModeSetting();
}
//=======================================================================================
//=======================================================================================
//====================================================
// for R/G/B Offset.
WORD GetRedColorOffsetValue100(void)
{ return GetScale100Value(UserPrefRedColorOffset, 0, 255);
}
WORD GetGreenColorOffsetValue100(void)
{ return GetScale100Value(UserPrefGreenColorOffset, 0, 255);
}
WORD GetBlueColorOffsetValue100(void)
{ return GetScale100Value(UserPrefBlueColorOffset, 0, 255);
}
WORD GetRedColorOffsetValue(void)
{ return UserPrefRedColorOffset;
}
WORD GetGreenColorOffsetValue(void)
{ return UserPrefGreenColorOffset;
}
WORD GetBlueColorOffsetValue(void)
{ return UserPrefBlueColorOffset;
}
WORD GetSpreadValue100(void)
{ return ((DWORD)UserPrefSpread*100)/0x7FF;
}
Bool AdjustBlueColorOffset(MenuItemActionType action)
{ WORD tempValue;
tempValue=DecIncValue(action, UserPrefBlueColorOffset, 0, 255, 1);
if (tempValue==UserPrefBlueColorOffset)
return FALSE;
UserPrefBlueColorOffset=tempValue;
mStar_WriteByte(BCB, UserPrefBlueColorOffset);
return TRUE;
}
//====================================================
Bool AdjustGreenColorOffset(MenuItemActionType action)
{ WORD tempValue;
tempValue=DecIncValue(action, UserPrefGreenColorOffset, 0, 255, 1);
if (tempValue==UserPrefGreenColorOffset)
return FALSE;
UserPrefGreenColorOffset=tempValue;
mStar_WriteByte(BCG, UserPrefGreenColorOffset);
return TRUE;
}
//====================================================
Bool AdjustRedColorOffset(MenuItemActionType action)
{ WORD tempValue;
tempValue=DecIncValue(action, UserPrefRedColorOffset, 0, 255, 1);
if (tempValue==UserPrefRedColorOffset)
return FALSE;
UserPrefRedColorOffset=tempValue;
mStar_WriteByte(BCR, UserPrefRedColorOffset);
return TRUE;
}
//**************************************************
Bool AdjustSpread(MenuItemActionType action)
{ WORD tempValue;
//tempValue=DecIncValue(action, UserPrefSpread, 0, 0x7FF, 1);
tempValue=DecIncValue(action, UserPrefSpread, 0, 255, 1);
if (tempValue==UserPrefSpread)
return FALSE;
UserPrefSpread=tempValue;
mStar_WriteWord(LPLL_SPAN_H, UserPrefSpread);
return TRUE;
}
WORD GetSpreadValue(void)
{ return UserPrefSpread;
}
Bool AdjustVolume(MenuItemActionType action)
{
WORD tempValue;
//tempValue=DecIncValue(action, UserPrefVolume, 4, 61, 1);
tempValue=DecIncValue(action, UserPrefVolume, MinVolumeValue, MaxVolumeValue, 1);
if (tempValue==UserPrefVolume)
return FALSE;
UserPrefVolume=tempValue;
if(UserPrefVolume==MinVolumeValue)
mStar_AdjustVolume(0);
else
mStar_AdjustVolume(UserPrefVolume);
Set_SaveSettingFlag();
return TRUE;
}
WORD GetVolumeValue(void)
{
//return UserPrefVolume;
//return GetScale100Value(UserPrefVolume, 4, 61);
return GetScale100Value(UserPrefVolume, MinVolumeValue, MaxVolumeValue);
}
//=======================================================================================
//=======================================================================================
void ShowBurninTime(void)
{
Osd_SetTextColor(CP_WhiteColor,CP_BlueColor);
Osd_DrawNum( 5, 1, G_BurninTimeHour);
Osd_DrawNum( 10, 1, G_BurninTimeMin);
Osd_DrawNum( 15, 1, Second);
Osd_DrawChar(10, 1, (BYTE)':');
Osd_DrawChar(15, 1, (BYTE)':');
}
Bool AdjustBurnin(MenuItemActionType action)
{ action=action;
if (BurninModeFlag)
{
Set_InputTimingChangeFlag();
mStar_WriteByte(FWC, 0);
Clr_BurninModeFlag();
}
else
{
Osd_Hide();
mStar_SetupFreeRunMode();
mStar_WriteByte(FWC, 1);
Set_BurninModeFlag();
Set_DoBurninModeFlag();
G_BurninTimeHour=0;
G_BurninTimeMin=0;
Second=0;
// UserPrefBurninTimeHour=0;
// UserPrefBurninTimeMin=0;
}
NVRam_WriteByte(nvrMonitorAddr(MonitorFlag), MonitorFlags);
return TRUE;
}
Bool AutoColor(void)
{ Bool result;
result=mStar_AutoColor();
if (result)
{ SaveMonitorSetting();
}
return result;
}
Bool AutoColor1(void)
{ Bool result;
//==========================================================
//Restore RGB default value
UserPrefRedColor9300K=DefRedColor9300K;
UserPrefGreenColor9300K=DefGreenColor9300K;
UserPrefBlueColor9300K=DefBlueColor9300K;
UserPrefRedColor6500K=DefRedColor6500K;
UserPrefGreenColor6500K=DefGreenColor6500K;
UserPrefBlueColor6500K=DefBlueColor6500K;
UserPrefRedColor=DefRedColor;
UserPrefGreenColor=DefGreenColor;
UserPrefBlueColor=DefBlueColor;
UserPrefRedColorOffset=DefRedColorOffset;
UserPrefGreenColorOffset=DefGreenColorOffset;
UserPrefBlueColorOffset=DefBlueColorOffset;
UserPrefContrast=DefContrast;
UserPrefBrightness=DefBrightness;
UserPrefColorTemp = CTEMP_6500K;
UserPrefColorTemp1=UserPrefColorTemp;
result=mStar_AutoColor();
if (result)
{ SaveMonitorSetting();
}
mStar_AdjustBrightness(UserPrefBrightness);
mStar_AdjustContrast(UserPrefContrast);
mStar_AdjustOffset();
return result;
}
Bool ColorUpdate(void)
{
SaveMonitorSetting();
return TRUE;
}
Bool FactoryReset(void)
{
MenuPageIndex=PowerOffMenu;
MenuItemIndex=0;
PowerOffSystem();
// Power_TurnOffPanel();
// Power_TurnOffAmberLed();
// Power_TurnOnAmberLed();
UserPrefContrast=DefContrast;
UserPrefBrightness=DefBrightness;
UserPrefColorTemp=CTEMP_6500K;
UserPrefOsdTime=20;
UserPrefOsdHStart=2;
UserPrefVolume=DefVolume;
UserPrefLanguage=LANG_English; //jon add
mStar_AdjustBrightness(UserPrefBrightness);
mStar_AdjustContrast(UserPrefContrast);
Osd_SetPosition(UserPrefOsdHStart, UserPrefOsdVStart);
AutoConfig();
Clr_FactoryModeFlag();
Clear_NVRam_All_ModeSetting();
SaveMonitorSetting();
return TRUE;
}
Bool MuteOn(void)
{
if(!AudioMuteOnFlag)
{
hw_SetMute();
Set_AudioMuteOnFlag();
Set_SaveSettingFlag();
}
return TRUE;
}
//1-8-2_2
Bool MuteOff(void)
{
if(AudioMuteOnFlag)
{
hw_ClrMute();
Clr_AudioMuteOnFlag();
Set_SaveSettingFlag();
}
return TRUE;
}
//=======================================================================================
//=======================================================================================
//add for WB Save by karl 20050501
void SaveFactory9300K(void)
{
NVRam_WriteByte(nvrMonitorAddr(RedColor9300K), UserPrefRedColor9300K);
NVRam_WriteByte(nvrMonitorAddr(GreenColor9300K), UserPrefGreenColor9300K);
NVRam_WriteByte(nvrMonitorAddr(BlueColor9300K), UserPrefBlueColor9300K);
}
void SaveFactory6500K(void) // add by karl 20050501
{
NVRam_WriteByte(nvrMonitorAddr(RedColor6500K), UserPrefRedColor6500K);
NVRam_WriteByte(nvrMonitorAddr(GreenColor6500K), UserPrefGreenColor6500K);
NVRam_WriteByte(nvrMonitorAddr(BlueColor6500K), UserPrefBlueColor6500K);
}
void SaveFactoryUser(void) // add by karl 20050501
{
NVRam_WriteByte(nvrMonitorAddr(RedColor), UserPrefRedColor);
NVRam_WriteByte(nvrMonitorAddr(GreenColor), UserPrefGreenColor);
NVRam_WriteByte(nvrMonitorAddr(BlueColor), UserPrefBlueColor);
}
Bool SetFactoryColorTemp9300K(void) // add by karl 20050501
{
#if UsesRGB
mStar_AdjustRedColor(UserPrefRedColor9300K, UserPrefGreenColor9300K, UserPrefBlueColor9300K);
mStar_AdjustGreenColor(UserPrefRedColor9300K, UserPrefGreenColor9300K, UserPrefBlueColor9300K);
mStar_AdjustBlueColor(UserPrefRedColor9300K, UserPrefGreenColor9300K, UserPrefBlueColor9300K);
#else
BYTE tempValue=UserPrefColorTemp;
UserPrefColorTemp=CTEMP_9300K;
mStar_AdjustRedColor(UserPrefRedColor9300K);
mStar_AdjustGreenColor(UserPrefGreenColor9300K);
mStar_AdjustBlueColor(UserPrefBlueColor9300K);
UserPrefColorTemp=tempValue;
#if 0
UserPrefRedColor=UserPrefRedColor9300K;
UserPrefGreenColor=UserPrefGreenColor9300K;
UserPrefBlueColor=UserPrefBlueColor9300K;
#endif
#endif
return TRUE;
}
Bool SetFactoryColorTemp6500K(void) // add by karl 20050501
{
#if UsesRGB
mStar_AdjustRedColor(UserPrefRedColor6500K, UserPrefGreenColor6500K, UserPrefBlueColor6500K);
mStar_AdjustGreenColor(UserPrefRedColor6500K, UserPrefGreenColor6500K, UserPrefBlueColor6500K);
mStar_AdjustBlueColor(UserPrefRedColor6500K, UserPrefGreenColor6500K, UserPrefBlueColor6500K);
#else
BYTE tempValue=UserPrefColorTemp;
UserPrefColorTemp=CTEMP_6500K;
mStar_AdjustRedColor(UserPrefRedColor6500K);
mStar_AdjustGreenColor(UserPrefGreenColor6500K);
mStar_AdjustBlueColor(UserPrefBlueColor6500K);
UserPrefColorTemp=tempValue;
#if 0
UserPrefRedColor=UserPrefRedColor6500K;
UserPrefGreenColor=UserPrefGreenColor6500K;
UserPrefBlueColor=UserPrefBlueColor6500K;
#endif
#endif
return TRUE;
}
Bool SetFactoryColorTempOrg(void) // add by karl 20050501
{
mStar_AdjustContrast(UserPrefContrast);
return TRUE;
}
extern BYTE Test;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -