📄 console.c
字号:
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
if ((msgtype==V_KEY_LEFT)||(msgtype==V_KEY_RIGHT)||(msgtype==V_KEY_TITLE)
||((msgtype>=V_KEY_0)&&(msgtype<=V_KEY_9))||(msgtype==V_KEY_ENTER))
{
if( g_UiCoreState != UI_CORE_STOP)
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
}
else
{
if((msgtype==V_KEY_LASTPLAY||msgtype==V_KEY_PLAY)&&(g_UiCoreState==UI_CORE_STOP))
{
CloseConsole();
}
return UI_NOUSE_FUNC_MSG;
}
}
switch(msgtype)
{
case V_KEY_LEFT:
if(DiscType == C_VCD20 || DiscType == C_SVCD ||DiscType==C_VCD10)
{
if(g_UiPlaybackMethod!=UI_PLAYBACKMETHOD_NORMAL)
{
PlaybackModeChangeSuccess(g_UiPlaybackList,g_UiPlaybackRepeatRange,UI_PLAYBACKMETHOD_NORMAL);
bLastRandomStatus=UI_PLAYBACKMETHOD_NORMAL;
}
}
if(totalpg!=1)
{
if(bitcount!=0)
{/*add code here*/
}
else/*pg number sub 1*/
{
curpgnum=tmpcurtt;
if ((curpgnum==1 ||(DiscType!=C_DVD && DiscType!=C_DVD_VR && DiscType!=C_DVD_AUDIO && curpgnum==0))
&&(DiscType!=C_FILEOPENDISC))
return UI_IS_FUNC_MSG;
else
curpgnum--;
tmpcurtt=curpgnum;
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
SetConsolePTTTimer(TIME_3SEC);// 3 seconds and validate
}
ItemState=WAITING_STATE;
}
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_RIGHT:
case V_KEY_TITLE:
if(DiscType == C_VCD20 || DiscType == C_SVCD ||DiscType==C_VCD10)
if(g_UiPlaybackMethod!=UI_PLAYBACKMETHOD_NORMAL)
{
PlaybackModeChangeSuccess(g_UiPlaybackList,g_UiPlaybackRepeatRange,UI_PLAYBACKMETHOD_NORMAL);
bLastRandomStatus=UI_PLAYBACKMETHOD_NORMAL;
}
if(totalpg!=1)
{
if(bitcount!=0)
{/*add code here*/
}
else/*pg number add 1*/
{
curpgnum=tmpcurtt;
if(curpgnum==totalpg)
return UI_IS_FUNC_MSG;//curpgnum=1;
else
{
if((DiscType!=C_DVD && DiscType!=C_DVD_VR && DiscType!=C_DVD_AUDIO && DiscType!=C_FILEOPENDISC && curpgnum==0))
curpgnum=1;
curpgnum++;
}
tmpcurtt=curpgnum;
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
SetConsolePTTTimer(TIME_3SEC);
}
ItemState=WAITING_STATE;
}
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_0:
case V_KEY_1:
case V_KEY_2:
case V_KEY_3:
case V_KEY_4:
case V_KEY_5:
case V_KEY_6:
case V_KEY_7:
case V_KEY_8:
case V_KEY_9:
if( (DiscType == C_VCD20 || DiscType == C_SVCD) && (OSD_Setup_Parameter.bPBC == C_ON) )
return UI_IS_FUNC_MSG;
if(bitcount==3)
return UI_IS_FUNC_MSG;
else
{
#if 1
DWORD playtime = 400;
temp=msgtype-C_KEY_0;
bitcount++;
if(bitcount==1)
{
if(temp==0)
{
bitcount=0;
return UI_IS_FUNC_MSG;
}
curpgnum=temp;
if(totalpg<10)
{
bitcount=0;
if(curpgnum<=totalpg)
{
}
else
return UI_IS_FUNC_MSG;
}
else
{
if(curpgnum>totalpg/10)
{
bitcount=0;
}
else
{
playtime = 3000;
}
}
SetConsolePTTTimer(playtime);
}
else
{
curpgnum=curpgnum*10+temp;
if(curpgnum>totalpg)
curpgnum=temp;
}
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
tmpcurtt=curpgnum;
#else
temp=msgtype-C_KEY_0;
bitcount++;
if(bitcount==1)
{
if(temp==0)
{
bitcount=0;
return UI_IS_FUNC_MSG;
}
curpgnum=temp;
if(totalpg<10)
{
bitcount=0;
if(curpgnum<=totalpg)
{
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
tmpcurtt=curpgnum;
SetConsolePTTTimer(400);
}
else
return UI_IS_FUNC_MSG;
}
else
{
if(curpgnum>totalpg/10)
{
bitcount=0;
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
tmpcurtt=curpgnum;
SetConsolePTTTimer(400);
}
else
{
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
tmpcurtt=curpgnum;
SetConsolePTTTimer(3000);
}
}
}
else
{
curpgnum=curpgnum*10+temp;
if(curpgnum>totalpg)
curpgnum=temp;
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
OSD_Console_Parameter.PlayPoint.wTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
tmpcurtt=curpgnum;
SetConsolePTTTimer(400);
}
#endif
}
ItemState=EDIT_STATE;
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_ENTER:
if( (DiscType == C_VCD20 || DiscType == C_SVCD) && (OSD_Setup_Parameter.bPBC == C_ON) )
return UI_IS_FUNC_MSG;
if(g_UiCoreState==UI_CORE_STOP) //030807-02lily
{
CloseConsole();
ifexit=1;
CurrentDomain = TT_DOM;
}
else
ifexit=0;
bitcount=0;
SetConsolePTTTimer(INFINITETIME);
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
//modified by jane for la bug 2312
if ((OSD_Console_Parameter.PlayPoint.wTTN==tmpcurtt)&&(g_UiCoreState!=UI_CORE_STOP)) //bond add for la bug 2210 031027
;
else
{
if (g_UiCoreState != UI_CORE_PLAY)
{
ClearRectArea(gui_hdc,GUITYPE_PLAYMODEGUI); //added by jane
bActionCtl = 0; // change for hanyang 1121
SendVFDPart1Show();
NVPlayModeChg(C_NV_Play,0);
ScrSaver(SCRSAVER_CANCEL);
ShowPlayModeGui(RS_FUN_OSD_PLAY, MSG_NULL );
g_UiCoreState = UI_CORE_PLAY;
}
//if (OSD_Console_Parameter.PlayPoint.wTTN!=tmpcurtt) //added by jane
{
OSD_Console_Parameter.PlayPoint.wTTN=tmpcurtt;//curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=1;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
OSD_Console_Parameter.PlayPoint.bDomain = 3;
if (!NVNoneSPECPTTPlay(&OSD_Console_Parameter.PlayPoint, C_STOP_SKIPPG,KEY_TITLE))
{
curpgnum=OSD_Console_Parameter.PlayPoint.wTTN;
}
if (g_UiPlaybackRepeatRange!=UI_PLAYBACKRANGE_REPEATALL&&RepeatAB_Counter!=REPEAT_AB_A) //added by jane
UiClearPlaybckMd();
if ((DiscType == C_DVD
) && (RepeatAB_Counter == REPEAT_AB_A || g_UiPlaybackRepeatRange == UI_PLAYBACKRANGE_REPEATALL))
UiClearPlaybckMd();
ClearRectArea(gui_hdc,GUITYPE_MODEGUI);
}
}
ItemState=DISPLAY_STATE;
SendVFDPart1Show();
if(ifexit==1) //030807-02lily
return UI_IS_FUNC_MSG;
break;
case V_KEY_PLAY:
case V_KEY_LASTPLAY:
if(g_UiCoreState==UI_CORE_STOP)
{
CloseConsole();
}
return UI_NOUSE_FUNC_MSG;
default:
return UI_NOUSE_FUNC_MSG;
}
{
BOOL chkflag;
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
{
GetModeStr(MODESTR_NUMSELECT,tmpcurtt,totalpg,str);
if (totalpg>1)
chkflag = CheckIfActive(CNSL_BOX_TITLE_DVD);
else
chkflag = 0;
}
else if(DiscType==C_VCD10||DiscType==C_VCD20||DiscType==C_SVCD)
{
GetModeStr(MODESTR_NUMSELECT,tmpcurtt,NVGetTTNsOrTrks(),str); //modified by jane
chkflag = CheckIfActive(CNSL_BOX_TITLE_VCD);
}
ShowBoxWithMemdc(gui_hdc,&menus[0],str,chkflag);
}
return UI_IS_FUNC_MSG;
}
//only DVD has ---
WORD CnslItemChapter(WORD msgtype)
{
int temp, totalpg;
BYTE str[30];
if(!NVIsUOPPermit(UOP1) ||!NVIsUOPPermit(UOP5))
{
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
if ((msgtype==V_KEY_LEFT)||(msgtype==V_KEY_RIGHT)
||((msgtype>=V_KEY_0)&&(msgtype<=V_KEY_9))||(msgtype==V_KEY_ENTER))
{
ShowDiscInfo(MSG_INVALID, MSG_NULL);
return UI_IS_FUNC_MSG;
}
else
return UI_NOUSE_FUNC_MSG;
}
totalpg=NVGetTTPTTNs(OSD_Console_Parameter.PlayPoint.wTTN);
switch(msgtype)
{
case V_KEY_LEFT:
if(totalpg!=1)
{
if(bitcount!=0)
{/*add code here*/
}
else/*pg number sub 1*/
{
curpgnum=temppttn;
if(curpgnum==1)
return UI_IS_FUNC_MSG;//curpgnum=totalpg;
else
curpgnum--;
temppttn=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
SetConsolePTTTimer(TIME_3SEC);
}
ItemState=WAITING_STATE;
}
else
{
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
if ((DiscType == C_DVD)
) /*get chapter num*/
curpgnum=temppttn;
else/*get track num*/
curpgnum=tmpcurtt;
}
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_RIGHT:
if(totalpg!=1)
{
if(bitcount!=0)
{/*add code here*/
}
else/*pg number add 1*/
{
curpgnum=temppttn;
if(curpgnum==totalpg)
return UI_IS_FUNC_MSG;//curpgnum=1;
else
curpgnum++;
temppttn=curpgnum;
OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
SetConsolePTTTimer(TIME_3SEC);
}
ItemState=WAITING_STATE;
}
else
{
if ((DiscType == C_DVD)) /*get chapter num*/
curpgnum=temppttn;
else/*get track num*/
curpgnum=tmpcurtt;
}
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
#endif
break;
case V_KEY_0:
case V_KEY_1:
case V_KEY_2:
case V_KEY_3:
case V_KEY_4:
case V_KEY_5:
case V_KEY_6:
case V_KEY_7:
case V_KEY_8:
case V_KEY_9:
/*PROCESS*/
if(bitcount==3)
return UI_IS_FUNC_MSG;
else
{
DWORD playtime = 400;
temp=msgtype-C_KEY_0;
bitcount++;
if(bitcount==1)
{
if(temp==0)
{
bitcount=0;
return UI_IS_FUNC_MSG;
}
curpgnum=temp;
temppttn=curpgnum;
if(totalpg<10)
{
bitcount=0;
if(curpgnum<=totalpg)
{
// OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
// OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
// SetConsolePTTTimer(400);
// playtime = 400;
}
else
return UI_IS_FUNC_MSG;
}
else
{
if(curpgnum>totalpg/10)
{
// OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
// OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
// SetConsolePTTTimer(400);
// playtime = 400;
bitcount=0;
}
else
{
// OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
// OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
// SetConsolePTTTimer(3000);
playtime = 3000;
}
}
}
else
{
curpgnum=curpgnum*10+temp;
if(curpgnum>totalpg)
curpgnum=temp;
// OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
// OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
temppttn=curpgnum;
//for the 100<=number <=999 ,should allow to input the three
//number
if(((totalpg<100)&&(bitcount==2))||(bitcount==3)) //dongqi fix 20040203
{
bitcount=0;
// SetConsolePTTTimer(400);
}
else
playtime = 3000;
// SetConsolePTTTimer(3000);
}
OSD_Console_Parameter.PlayPoint.wPTTN=curpgnum;
OSD_Console_Parameter.PlayPoint.dwLBAAddr=0;
SetConsolePTTTimer(playtime);
}
ItemState=EDIT_STATE;
#if (_CONSOLE_AUTO_CLOSE_TIME >= 1)
SetConsoleTimer(_CONSOLE_AUTO_CLOSE_TIME*1000);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -