📄 console.c
字号:
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_DOWN:
bitcount=0;
if(g_UiCoreState==UI_CORE_STOP)////030807-02lily:for stop show just one item
return UI_IS_FUNC_MSG;
ItemState=DISPLAY_STATE;
if(
(
(DiscType==C_DVD||DiscType==C_DVD_VR)&&
(cnsl_cur_item_id==CNSL_BOX_TITLE_DVD || cnsl_cur_item_id== CNSL_BOX_CHAPTER_DVD)
)
||
(
(DiscType==C_VCD10||
(
(DiscType==C_VCD20||DiscType==C_SVCD)&&
(OSD_Setup_Parameter.bPBC==C_OFF)
)
)&&
cnsl_cur_item_id==CNSL_BOX_TITLE_VCD
)
)
{
/*
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
temppttn=OSD_Console_Parameter.PlayPoint.wPTTN;
if(cnsl_cur_item_id==CNSL_BOX_TITLE_DVD)
tmpcurtt=OSD_Console_Parameter.PlayPoint.wTTN;
else
tmpcurtt=OSD_Console_Parameter.PlayPoint.wPTTN;
SetConsolePTTTimer(INFINITETIME);
*/
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
if(cnsl_cur_item_id==CNSL_BOX_CHAPTER_DVD)
temppttn=OSD_Console_Parameter.PlayPoint.wPTTN;
else
tmpcurtt=OSD_Console_Parameter.PlayPoint.wTTN;
// else
// tmpcurtt=OSD_Console_Parameter.PlayPoint.wPTTN;
SetConsolePTTTimer(INFINITETIME);
}
#if 1
preitem = cnsl_cur_item;//store preitem. NOTE: maybe a wrong number!!!
if(cnsl_cur_item >= menu_count)
cnsl_cur_item = 0;
// printf("up1: preitem=%d, cnsl_cur_item=%d,menu_count=%d\r\n",preitem, cnsl_cur_item, menu_count);
{
int i;
for(i=cnsl_cur_item+1;;i++){
if(i>=menu_count) i-=menu_count;
if(i == cnsl_cur_item) break;
//W if(i<0) i+=menu_count; //round back
if(menus[i].status != MENU_DISABLE)//found a item
break;
}
cnsl_cur_item = i;//cnsl_cur_item is a valid number
}
// printf("up2: preitem=%d, cnsl_cur_item=%d\r\n", preitem, cnsl_cur_item);
if(preitem != cnsl_cur_item){
CONSOLEHighLightItem(gui_hdc, preitem,FALSE);
CONSOLEHighLightItem(gui_hdc, cnsl_cur_item,TRUE);
ShowHintBox(gui_hdc, cnsl_cur_item_id);//for downsize, but badly coded
}
#else
preitem = cnsl_cur_item;
{
int i;
for(i=preitem+1;i%=menu_count,i!=preitem;i++){
// if(i>=menu_count) i-=menu_count; //round back
if(menus[i].status != MENU_DISABLE)//found a item
break;
}
cnsl_cur_item = i;
}
if(preitem != cnsl_cur_item){
CONSOLEHighLightItem(gui_hdc, preitem,FALSE);
CONSOLEHighLightItem(gui_hdc, cnsl_cur_item,TRUE);
ShowHintBox(gui_hdc, cnsl_cur_item_id);//for downsize, but badly coded
}
//-------------
if ((DiscType == C_DVD))
{
preitem=cnsl_cur_item;
if(cnsl_cur_item<6)
cnsl_cur_item+=1;
else
cnsl_cur_item=0;
if(DiscType == C_DVD_VR)
{
if(cnsl_cur_item == 5)
cnsl_cur_item = 6;
}
//30929-01mi
if ((cnsl_cur_item_id== CNSL_BOX_CHAPTER_DVD) && (NVChkIsMultiPGC())) //modified by jane (NVIsUOPPermit(UOP1)!=TRUE) || (NVIsUOPPermit(UOP5)!=TRUE) ||
cnsl_cur_item = 2;
//--------------
//30929-01mi
if ((cnsl_cur_item == 2) && ((NVIsUOPPermit(UOP0)!=TRUE) || (NVIsUOPPermit(UOP5)!=TRUE) )) //modified by jane (NVIsUOPPermit(UOP5)!=TRUE)
cnsl_cur_item = 3;
//-------------------
CONSOLEHighLightItem(gui_hdc, preitem,FALSE);
CONSOLEHighLightItem(gui_hdc, cnsl_cur_item,TRUE);
ShowHintBox(gui_hdc,cnsl_cur_item_id);
}
else
{
preitem=cnsl_cur_item;
if(cnsl_cur_item==3)
{
if(OSD_Setup_Parameter.bPBC==C_ON)
{
if(DiscType == C_SVCD)
cnsl_cur_item=2;
else if(DiscType==C_VCD20)
cnsl_cur_item=1;
else
cnsl_cur_item=0;
}
else
cnsl_cur_item=0;
}
else
{
cnsl_cur_item+=1;
}
CONSOLEHighLightItem(gui_hdc, preitem,FALSE);
CONSOLEHighLightItem(gui_hdc, cnsl_cur_item,TRUE);
// ShowHintBox(gui_hdc,VcdGetHintIndex(vcdcnsl_cur_item));
ShowHintBox(gui_hdc, cnsl_cur_item_id);//for downsize, but badly coded
}
#endif
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_RETURN:
case V_KEY_CONSOLE:
CloseConsole();
return UI_IS_FUNC_MSG;
case V_KEY_TMSCR:
CloseConsole();
return UI_NOUSE_FUNC_MSG;
#ifdef CONSOLE_AND_REMAINTIME
case V_KEY_SHOWTIME:
if ( bOSDShowTimeMode==C_REMAIN_CH_TM )
{
CloseConsole();
}
return UI_NOUSE_FUNC_MSG;
#endif
case V_KEY_VOLUM:
if(SYSOption.bDTS == C_OFF)
{
if(g_UiCoreState != UI_CORE_STOP &&( AudioType == C_DTS || AudioType == C_DTS_CD_AUDIO))
{
ShowDiscInfo( MSG_INVALID, MSG_NULL );
return UI_NOUSE_FUNC_MSG;
}
}
//jane added for no mic don't clear console menu
if(LeftMicStatus == C_LEFT_MIC_OFF && RightMicStatus == C_RIGHT_MIC_OFF)
{
return UI_NOUSE_FUNC_MSG;
}
else if(g_UiCoreState==UI_CORE_STOP)
return UI_NOUSE_FUNC_MSG;
else
{
CloseConsole();
return UI_NOUSE_FUNC_MSG;
}
case V_KEY_BOOKMARK:
//case V_KEY_STOP:
// case V_KEY_STEP:
case V_KEY_FILEOPEN:
case V_KEY_REPEAT:
case V_KEY_REPEAT_AB:
#if ( DVIEW_MODE==DVIEW_Enable )
case V_KEY_PROGRAM:
#endif
CloseConsole();
return UI_NOUSE_FUNC_MSG;
#ifdef _BRIGHT_ENABLE_
case V_KEY_VOLDOWN:
CloseConsoleWhenOpen();
return UI_NOUSE_FUNC_MSG;
#endif
#ifdef _MUTE_ENABLE_
case V_KEY_VOLUP:
case V_KEY_MUTE:
CloseConsoleWhenOpen();
return UI_NOUSE_FUNC_MSG;
#endif
//added by jane
case V_KEY_STOP:
CloseConsole();
if (g_UiCrntSubFunc == UI_SUBFUNC_ZOOM)
CloseZoom();
return UI_NOUSE_FUNC_MSG;
case V_KEY_DINTIAN_STOP:
CloseConsole();
if (g_UiCrntSubFunc == UI_SUBFUNC_ZOOM)
CloseZoom();
return UI_NOUSE_FUNC_MSG;
case V_KEY_ZOOM:
if(DiscType==C_CDDA||DiscType == C_HDCDDA||DiscType==C_DTSCD)
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
else
{
if(g_UiCoreState==UI_CORE_STOP)
return UI_NOUSE_FUNC_MSG;
//David: Console+Zoom
if(gZoomFuncPlus == TRUE)
{
UiSubFuncZoomProc(C_FP_KEY,V_KEY_ZOOM);
return UI_IS_FUNC_MSG;
}
else
{
gZoomFuncPlus = TRUE;
return UI_NOUSE_FUNC_MSG;
}
}
case V_KEY_MENU:
if ((DiscType == C_DVD)) //030530-01ba//dvd audio sh
{
CloseConsole();
}
return UI_NOUSE_FUNC_MSG;
case V_KEY_OPEN:
CloseConsoleWhenOpen();
return UI_IS_FUNC_MSG;
case V_KEY_POWER:
case V_KEY_SETUP:
CloseConsoleWhenOpen();
return UI_NOUSE_FUNC_MSG;
case V_KEY_NEXT:
case V_KEY_PREV:
case V_KEY_PAUSE:
case V_KEY_STEP:
case V_KEY_REVSTEP:
case V_KEY_FF:
case V_KEY_REV:
case V_KEY_SLOW:
case V_KEY_REVSLOW:
//case V_KEY_PLAY://bond add for bug 1827 031026
return UI_NOUSE_FUNC_MSG;
case V_KEY_10:
break;
case V_KEY_TITLE:
CloseConsole();
return UI_NOUSE_FUNC_MSG;
case V_KEY_VOICE:
if(g_UiCoreState == UI_CORE_PAUSE || g_UiCoreState == UI_CORE_STEP)
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
if(g_UiCoreState!=UI_CORE_STOP && g_UiCoreState != UI_CORE_PAUSE)////030807-02lily:for stop show just one item
{
if(DiscType==C_DVD||DiscType==C_DVD_VR)
{
if(CheckIfActive(CNSL_BOX_AUDIO_DVD)==FALSE)
{
if(cnsl_cur_item_id==CNSL_BOX_AUDIO_DVD && NVIsUOPPermit(UOP20) != TRUE&&DiscType==C_DVD)//bond add for la bug
ShowDiscInfo(MSG_INVALID, MSG_NULL);
JumpToHighlight(CNSL_BOX_AUDIO_DVD);
break;
}
}
if(DiscType==C_VCD10 || DiscType==C_SVCD ||DiscType==C_VCD20)
{
if(CheckIfActive(CNSL_BOX_AUDIO_VCD)==FALSE)
{
JumpToHighlight(2);
break;
}
}
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
Cnsl_DVDItemProc[cnsl_cur_item](key);
else
Cnsl_VCDItemProc[cnsl_cur_item](key);
}
return UI_IS_FUNC_MSG;
case V_KEY_SUBP:
if(g_UiCoreState == UI_CORE_PAUSE || g_UiCoreState == UI_CORE_STEP)
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
if(g_UiCoreState!=UI_CORE_STOP && g_UiCoreState != UI_CORE_PAUSE)////030807-02lily:for stop show just one item
{
if(DiscType==C_DVD||DiscType==C_DVD_VR)
{
if(CheckIfActive(CNSL_BOX_SUBTITLE_DVD)==FALSE)
{
//bond add for la bug 031217
if ((NVIsUOPPermit(UOP21) != TRUE)&&cnsl_cur_item_id== CNSL_BOX_SUBTITLE_DVD&&DiscType==C_DVD)
ShowDiscInfo(MSG_INVALID, MSG_NULL);
JumpToHighlight(CNSL_BOX_SUBTITLE_DVD);
break;
}
if(DiscType==C_VCD10 || DiscType==C_SVCD ||DiscType==C_VCD20)
break;
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
Cnsl_DVDItemProc[cnsl_cur_item](key);
}
}
return UI_IS_FUNC_MSG;
case V_KEY_ANGLE:
if(g_UiCoreState == UI_CORE_PAUSE || g_UiCoreState == UI_CORE_STEP||DiscType==C_DVD_VR)
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
if(g_UiCoreState!=UI_CORE_STOP && g_UiCoreState != UI_CORE_PAUSE)////030807-02lily:for stop show just one item
{
if(DiscType==C_DVD)
if(CheckIfActive(CNSL_BOX_ANGLE_DVD)==FALSE)
{
JumpToHighlight(CNSL_BOX_ANGLE_DVD);
break;
}
if(DiscType==C_VCD10 || DiscType==C_SVCD ||DiscType==C_VCD20)
break;
if ((DiscType == C_DVD) )
Cnsl_DVDItemProc[cnsl_cur_item](key);
}
return UI_IS_FUNC_MSG;
case V_KEY_SurroundOnOff:
if(g_UiCoreState == UI_CORE_PAUSE || g_UiCoreState == UI_CORE_STEP)
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
if(g_UiCoreState!=UI_CORE_STOP && g_UiCoreState != UI_CORE_PAUSE)////030807-02lily:for stop show just one item
{
if (DiscType == C_DVD
)
if(CheckIfActive(CNSL_BOX_SOUND_DVD)==FALSE)
{
JumpToHighlight(CNSL_BOX_SOUND_DVD);
break;
}
if(DiscType==C_VCD10 || DiscType==C_SVCD ||DiscType==C_VCD20)
if(CheckIfActive(CNSL_BOX_SOUND_VCD)==FALSE)
{
JumpToHighlight(3);
break;
}
if(DiscType==C_VCD10 || DiscType==C_SVCD ||DiscType==C_VCD20)
Cnsl_VCDItemProc[cnsl_cur_item](key);
else
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
Cnsl_DVDItemProc[cnsl_cur_item](key);
}
return UI_IS_FUNC_MSG;
default:
//haiyuan031103-01 For when stop press num. Then press play.
if(key == V_KEY_PLAY||key==V_KEY_LASTPLAY)
{
if (((VirDiscType == C_VCD20) || (VirDiscType == C_SVCD)) && g_UiPBCState == C_ON&& (g_UiCoreState==UI_CORE_STOP))
{
CloseConsole();
return UI_NOUSE_FUNC_MSG;
}
}
//end haiyuan031103-01
if ((key==V_KEY_CLEAR)&&(!( /*(*/((DiscType == C_DVD) && (cnsl_cur_item == CNSL_BOX_TIME_DVD))/*)*/
|| /*(*/ ( /*(*/((DiscType==C_VCD10)||(DiscType==C_VCD20)||(DiscType==C_SVCD)) /*)*/ &&(cnsl_cur_item == 1)) /*)*/)))
{/*
CloseConsole();
return UI_NOUSE_FUNC_MSG;
*/
CloseZoom();
return UI_IS_FUNC_MSG;
}
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
wret=Cnsl_DVDItemProc[cnsl_cur_item](key);
else//
{
#if 1
if(
(DiscType == C_VCD20 || DiscType == C_SVCD) &&
(g_UiCoreState==UI_CORE_PAUSE||g_UiCoreState==UI_CORE_STOP) &&
OSD_Setup_Parameter.bPBC==C_ON &&
cnsl_cur_item == 0
)
wret=UI_IS_FUNC_MSG;//do nothing
else
wret=Cnsl_VCDItemProc[cnsl_cur_item](key);
#else
//030807-02lily
if(
(g_UiCoreState==UI_CORE_PAUSE||g_UiCoreState==UI_CORE_STOP)&&
(
DiscType==C_SVCD||
(DiscType==C_VCD20&&OSD_Setup_Parameter.bPBC==C_ON)
)&&
cnsl_cur_item==0
)
{
wret=UI_IS_FUNC_MSG;
}
else
wret=Cnsl_VCDItemProc[cnsl_cur_item](key);
#endif
}
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
}
return wret;
}
WORD ConsoleRespondNVNotice(DWORD MsgInput)
{
AUDIOSTREAM AudioInfo;
switch(MsgInput)
{
case C_DVD_TITLE_NUM: /* C_VCD_TRACK_NUM */
if(DiscType==C_VCD10||DiscType==C_VCD20||DiscType==C_SVCD||DiscType==C_FILEOPENDISC)
{
if(g_UiCoreState!=UI_CORE_PAUSE&&g_UiCoreState!=UI_CORE_STOP)////030807-02lily:for stop show just one item
ConsoleModifyTT_PTT_SRC();
//for lg spec(bug 901):when vcd track change,clear screenfit mode
if(gZoomFuncPlus == TRUE)
UiSubFuncZoomProc(C_NV_NOTICE,C_VCD_TRACK_NUM);
}
if (DiscType == C_DVD
)
{
CloseZoom();
if(DiscType==C_DVD_VR)
ConsoleModifyTT_PTT_SRC();
}
return UI_IS_FUNC_MSG;
case C_DVD_CHAPTER_NUM: /* C_VCD_ENTRY_NUM */
if(g_UiCoreState!=UI_CORE_PAUSE&&g_UiCoreState!=UI_CORE_STOP)////030807-02lily:for stop show just one item
{
if((DiscType==C_VCD20||DiscType==C_SVCD) &&IsVCD20SVCDSelectionList())
{
CloseConsole();
return UI_IS_FUNC_MSG;
}
NVGetAudioInfo(&AudioInfo);
ConsoleModifyTT_PTT_SRC();
ConsoleModifySubPic();
//gamble add
if(AudioType!=C_AC3 || AudioInfo.AStreamTotalNo == 0||DiscType == C_DVD_VR)
//if(AudioType!=C_AC3 && AudioType!=C_DTS)
ConsoleModifyVoice();
if(AudioType==C_DTS)
ConsoleModifyVocal();
ConsoleModifyAngle();
}
break;
case C_DISC_AUDIOTYPECHG:
//if((DiscType==C_DVD)||(DiscType == C_DVD_AUDIO) || (DiscType == C_DVD_VR)||(DiscType==C_VCD20)||(DiscType==C_SVCD))
//ConsoleModifyVoice();
break;
case C_DVD_ANGLECHK:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -