📄 osdsrch.c
字号:
if( (__bSearchCursor==SEARCH_CURSOR_TITLE) && (__bSearchMode==SEARCH_MODE_TIME) ) __bSearchCursor+=2; else#endif //#ifndef NO_DISC_MODE //CoCo2.37p __bSearchCursor++; } else { if( (__bSearchCursor==SEARCH_CURSOR_TIME) && // LLY.039 (__bSearchMode==SEARCH_MODE_TIME) ) __bSearchCursor-=2; else __bSearchCursor--; } // LLY.037 end#ifndef NO_DISC_MODE //CoCo2.37p // DVD_099Micky, add GOTOTIME UOP check // check if Title selection not allowed if ( !NV_QueryUOP (UOP_CAN_TITLE_PLAY) ) { // can only choose chapter __bSearchCursor=SEARCH_CURSOR_CHAPTER; } // check if chapter selection not allowed if ( !NV_QueryUOP (UOP_CAN_PTT_SEARCH) ) { // can only choose title __bSearchCursor=SEARCH_CURSOR_TITLE; } // DVD_099Micky, add 0 protection if (__bSearchTitle==0) __bSearchTitle=1; if (__wSearchChapter==0) __wSearchChapter=1; // depending on search mode, to toggle the search cursor while out of range if(__bSearchMode==SEARCH_MODE_TITLE_CHAPTER) { if(__bSearchCursor>SEARCH_CURSOR1_END) __bSearchCursor=SEARCH_CURSOR_BEGIN; else if(__bSearchCursor<SEARCH_CURSOR_BEGIN) __bSearchCursor=SEARCH_CURSOR1_END; //OSDSRCH_Search(MSG_SEARCH,OSD_INPUT_TITLE_CHAPTER,0xff); //OSDSRCH_ShowUI(SEARCH_MODE_TITLE_CHAPTER); } else if(__bSearchMode==SEARCH_MODE_TIME)#else if(__bSearchMode==SEARCH_MODE_TIME)#endif //#ifndef NO_DISC_MODE //CoCo2.37p { if(__bSearchCursor>SEARCH_CURSOR2_END) __bSearchCursor=SEARCH_CURSOR_BEGIN; else if(__bSearchCursor<SEARCH_CURSOR_BEGIN) __bSearchCursor=SEARCH_CURSOR2_END; //OSDSRCH_Search(MSG_SEARCH,OSD_INPUT_TITLE_CHAPTER,0xff); //OSDSRCH_ShowUI(SEARCH_MODE_TITLE_CHAPTER); } OSDSRCH_ShowUI(__bSearchMode); //OSD_OUTPUT_MACRO(MSG_SEARCH, NULL, 0xFF); // LLY.050 return KEY_NO_KEY;; case KEY_NUMBER: /* if ( (__wDiscType & BOOK_DVD) ) { // DVD_099bMicky, must give title parameter for UOP query __bUOP_Parameter = __bTitle; // must check Time Search // Alex1.24, don't record bookmark time when non-title domain if ( ! NV_QueryUOP (UOP_CAN_TIME_SEARCH) || (__bDomain !=TT_DOM) ) { return INVALID_KEY; } }// Alex1.24, don't record bookmark time when segment play item else if (__wPlayItem > 999 ) // segment playitem { return INVALID_KEY; } */ OSDSRCH_ShowUI(__bSearchMode); return KEY_NO_KEY;; case KEY_CLEAR: __dwNumberPrevious = 0;#ifndef NO_DISC_MODE //CoCo2.37p if (__bSearchCursor == SEARCH_CURSOR_TITLE) { if(__wDiscType & BOOK_DVD) { __bSearchTitle = __bTitle; } else if (__wDiscType & BOOK_CDDA) { } else //BOOK_VCD/BOOK_CVD/BOOK_SVCD { } } else if (__bSearchCursor == SEARCH_CURSOR_CHAPTER) { __wSearchChapter = __wChapter; } else //SEARCH_CURSOR_TIME#endif //#ifndef NO_DISC_MODE //CoCo2.37p { __bTimeHour = 0; __bTimeMin = 0; __bTimeSec = 0; __bGoToTimeNO = 0; } _ShowOneEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG); return KEY_NO_KEY;; default: return INVALID_KEY; }}// LLY.036 begin, one function to process search mode action// *****************************************************************// Function : _OSDSRCH_ProcessSearchAction// Description : Process search mode action// Argument :// Return : TRUE, the action has processed and is valid// FALSE, the action is invalid// Side Effect :// *****************************************************************BYTE OSDSRCH_ProcessSearchAction(BYTE bKey, WORD wParam){ DWORD dwTemp; switch(bKey) { case KEY_NUMBER: // wyc1.10, add a independent define to control the on/off of CDROM titles number confirm key#ifndef SUPPORT_NUMBER_CONFIRM_KEY#ifdef SUPPORT_CDROM_NUMBER_CONFIRM_KEY if (__wDiscType & BOOK_M1)#else if (0)#endif // #endif ////DVD_051Micky, Number >10 { // the 1st digit input // bit 15=0, means this input number is the first number if ( !(__wNumberQueue & 0x8000) ) { // save the first value __wNumberQueue = wParam; __wNumberQueue |=0x8000; } else { //DVD_099Micky, clear the flag later, as still need check /* // clear the flagO __wNumberQueue &=0x7fff; // second number, must calculate 1st & 2nd number as one value wParam += __wNumberQueue*10; */ __wNumberQueue |=0x4000; // set the second digit flag // second number, must calculate 1st & 2nd number as one value wParam += (__wNumberQueue&0x3fff)*10; } // DVD_099Micky, don't do protection here, must check final data. // os it will cause OSD won't display the value in time // protect, Title/Chapter can't be 0 if (__wNumberQueue &0x4000) // second value has been input { __wNumberQueue &=0x3fff; if (wParam==0) // 0 can be final digit only wParam=1; } } switch(__bSearchCursor) {#ifndef NO_DISC_MODE //CoCo2.37p case SEARCH_CURSOR_TITLE: __bSearchTitle=(BYTE)wParam; if(__bSearchTitle > __bTitle_Ns) __bSearchTitle=__bTitle_Ns; // set default value as max title //Kevin0.86, add if(!__bSearchTitle) __bSearchTitle=1; DVD_ParseInfo ( DVD_TOTAL_CHAPTERS, & dwTemp, __bSearchTitle ); __wSearchChapter_Ns_Title= (WORD) dwTemp; __wSearchChapter=0x1; break; case SEARCH_CURSOR_CHAPTER: __wSearchChapter=(BYTE)wParam; if(__wSearchChapter > __wSearchChapter_Ns_Title) __wSearchChapter=__wSearchChapter_Ns_Title; // set defai;t va;ie as max chapter //Kevin0.86, add if(!__wSearchChapter) __wSearchChapter=1; break;#endif //#ifndef NO_DISC_MODE //CoCo2.37p case SEARCH_CURSOR_TIME: break; } //OSD_OUTPUT_MACRO(MSG_SEARCH, NULL, 0xFF); // LLY.050 OSDSRCH_ShowUI(__bSearchMode); return TRUE; default: return FALSE; }}// DVD_160Micky, re-arrange the whole function// *********************************************************************// Function : _OSDSRCH_ConfirmAction// Description : Process the input number// Arguments : wValue, the input numver value// : must be a decided value, i.e. no time key.// Return : none.// Side Effect :// *********************************************************************void _OSDSRCH_ConfirmAction(WORD wValue){// DVD_160Micky, number 0 is invalid under some case.// [NUMBER] CHECK NUMBER 0's validity if (! wValue ) // input value is 0 {#ifndef KEY_N0_SAME_NPLUS // at this case, 0 still means 0. // 0 is valid in GOTOTIME // NUM_N0 is valid in inputprogram mode in new program mode//alex1.23,20040218 combine gototime , search// if (__btGoToTime || __btInputProgram if ( (__bSearchMode == SEARCH_MODE_TIME) || __btInputProgram#ifdef SUPPORT_NUMBER_CONFIRM_KEY // allow 0 as input in tt/cc serach mode // DVD_160.aMicky, fix can't input 10/20/N0 in TT/CC search mode || (__bSearchMode == SEARCH_MODE_TITLE_CHAPTER)#endif ) { // gototime/programinput allow 0 as input } else // other modes don't allow 0 as input. { // menu-> 0x is processed in _CC_Process_KeyNumber (0) first OSD_Output(MSG_INVALID, OSD_ERR_NUMBER, 1 ); return; }#else // at this case, 0 means 10 or 20 or x0. // DVD_276Micky, don't allow 10+ in __bSearchMode.// if ( !__btGoToTime && !__btInputProgram ) // "0" assuem KEY_NPLUS//alex1.23,20040218 combine gototime , search// if ( !__btGoToTime && !__btInputProgram && !__bSearchMode) // "0" assuem KEY_NPLUS if ( !__btInputProgram && (__bSearchMode == SEARCH_MODE_OFF) ) // "0" assuem KEY_NPLUS { __dwNumberPrevious= KEY_NPLUS; wValue = KEY_NPLUS; }#endif }// [NUMBER] GOTOTIME/PROGRAM // DVD_160Micky, make number input mode has top priority // fix VCD2.0 menu-> Program-> input number // for DVD/VCD/MP3/CD-DA.. are all same.//alex1.23,20040218 combine gototime , search// if ( __btGoToTime || __btInputProgram ) if ( (__bSearchMode==SEARCH_MODE_TIME)|| __btInputProgram ) { if ( LINEAR_Action(KEY_NUMBER, wValue) ) return; }// [NUMBER] SEARCH TT/CC else//alex1.23,20040218 combine gototime , search// if(__bSearchMode) // process number key in search mode if(__bSearchMode==SEARCH_MODE_TITLE_CHAPTER) // process number key in search mode { //alex0909,use osdsrch_ProcessSearchAction to replace _CC_ProcessSearchAction if( OSDSRCH_ProcessSearchAction(KEY_NUMBER, wValue)== KEY_NO_KEY ) return; }// [NUMBER] DIGEST// Micky1.20, 4M flash#ifndef NO_DIGEST else if ( __btDIGEST ) { if ( DIGEST_Number(LOBYTE(wValue)) ) return; }#endif#ifndef NO_DISC_MODE //CoCo2.37p else// [NUMBER] DVD BUTTON number if ( __wDiscType & BOOK_DVD ) { OSD_OUTPUT_MACRO ( MSG_NUMBER, wValue, 1 );// Micky2.78b-2, Support using number key to select chapter play.// Only when in title domain and and no selective buttons.// only need check no selective button case.// (NF-200, Dinosaur has the case that TT_DOM, but have selective buttons)#ifdef SUPPORT_PLAY_CHAPTER_BY_NUMBER if ( !NV_Action(ACTION_NUMBER_CHECK, NULL_0) ) { // input number is out of chapter range. if ( wValue > __wChapter_Ns_Title ) { OSD_Output(MSG_INVALID, OSD_ERR_NUMBER, 1 ); return; } //Kevin1.24a, fix "program mode is not cleared when inputting number to select chapter" if (__btPlayingProgram) LINEAR_Program(LINEAR_PROGRAM_CLEAR, NULL_0); NV_TitlePlay(__bTitle, wValue); HAL_Reset(HAL_RESET_AUDIO); HAL_Reset(HAL_RESET_SPST); HAL_Reset(HAL_RESET_VIDEO); // DVD_103Micky, fix GoToTime will hang issue // need restore the play command UTL_TransferCommandID(__bModeCmd); //HAL_Display (HAL_DISPLAY_ONE_FIELD, 0); return; } else#endif if ( NV_Action ( ACTION_NUMBER, wValue) ) return; }#endif //#ifndef NO_DISC_MODE //CoCo2.37p else { // In PBC Stop->Key number // will directly play the track number in linear mode#ifdef AUTO_PBCOFF#ifndef NO_DISC_MODE //++CoCo2.37p if ( __btPBC && (__bModeCmd==KEY_STOP) ) { // directly play the number if in PBC stop mode // just turn PBC off __btPBC=FALSE; //OSD_OUTPUT_MACRO(MSG_PBC, FALSE, 0); }#endif //#ifndef NO_DISC_MODE //++CoCo2.37p#endif //#ifdef AUTO_PBCOFF#ifndef NO_DISC_MODE //++CoCo2.37p
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -