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

📄 osd.c

📁 车载电子影音系统dvd播放系统原程序代码
💻 C
📖 第 1 页 / 共 5 页
字号:
			// In thumbnail mode,disp;ay mode 1 stiil on, but we need to use ND to siplay messages like "Invalid"
			OSDND_Update(bMessage, wParam);
		}
		// Brian1.00
		// for the following cases, we stil need to show NU and NB message
		// [1] Digest mode and Display mode 1 is on
		// [2] DVD Program and Display mode 1 is on
		// [3] FM and Display mode 1 is on
		// [4] Goto Time / Search and Display mode 1 is on
		else if (!_bIsDisplayModeMessage &&
			(
			//LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST	                            
			_bCurrentUI == OSD_UI_DIGEST || 
#endif
			_bCurrentUI == OSD_UI_DVD_PROGRAM
			|| _bCurrentUI == OSD_UI_FM  // Brian1.07, since we support FM UI show/not show, it may be _bCurrentUI == OSD_UI_FM but __bDisplay is 1
			|| _bCurrentUI == OSD_UI_SEARCH)) // Brian1.10-2
		{                                                        
			_bOSDTemp = FALSE; // set to FASLE, ND will handle it.
		}
		
		break;
	case 2: // Virtual Panel mode
		if (_bCurrentUI == OSD_UI_DISPLAY)
		{
			_bOSDTemp = OSDVP_Update(bMessage, wParam);
		}
		// Brian1.00
		// for the following cases, we stil need to show NU and NB message
		// [1] DVD Program and Display mode 2 is on
		//else if (!_bIsDisplayModeMessage && (_bCurrentUI == OSD_UI_DVD_PROGRAM))
        //CoCo1.24a, fix the bug about Display mode 2==>Search UI==>KEY_SURROUND don't display message.
        else if (!_bIsDisplayModeMessage && ((_bCurrentUI == OSD_UI_DVD_PROGRAM) || (_bCurrentUI == OSD_UI_SEARCH)))
		{                                                        
			_bOSDTemp = FALSE; // set to FASLE, ND will handle it.
		}
		break;
	default: // Normal Display Mode
		_bOSDTemp = FALSE;      
	}
	
	if (!_bOSDTemp && _pOSDCurMsg)
	{
		//_bOSDTemp = OSDND_GetMessagePos(_pOSDCurMsg->bMessage); //--CoCo2.31, Don't understand its effect.
        
        OSDND_Update(bMessage, wParam);         
	}
#endif //#ifdef SHOW_6_DISPLAY_MODE  //CH00.105            
}

//  *******************************************************************
//  Function    :   _OSD_ClearDisplayMessage
//  Description :       Clear the message from the Display
//  Arguments   :   bMessage: the message to clear
//  Return      :   void
//                                      
//  Side Effect :
//  *******************************************************************
void _OSD_ClearDisplayMessage(BYTE bMessage)
{
	_bOSDTemp = TRUE;
	
	switch(__bDisplay)
	{
#ifdef SHOW_6_DISPLAY_MODE   //ch00.105
		
	case 1: // Virtual Panel mode
		if (_bCurrentUI == OSD_UI_DISPLAY)
			_bOSDTemp = OSDVP_Update(MSG_CLEAR, bMessage);
		// Brian1.00
		// for the following cases, we stil need to clear NU and NB message
		// [1] DVD Program and Display mode 2 is on
		else if (_bCurrentUI == OSD_UI_DVD_PROGRAM)
			_bOSDTemp = FALSE;
		
		break;
	case 2: // Line Display mode
	case 3:
	case 4:
	case 5: 
	case 6:
		if (_bCurrentUI == OSD_UI_DISPLAY)
			_bOSDTemp = OSDLD_Update(MSG_CLEAR, bMessage);
		else if (_bCurrentUI == OSD_UI_THUMBNAIL
			// Brian1.00
			// for the following cases, we stil need to clear NU and NB message
			// [1] Digest mode and Display mode 1 is on
			// [2] DVD Program and Display mode 1 is on
			// [3] FM and Display mode 1 is on
			// [4] Goto Time / Search and Display mode 1 is on
			//LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST	                            
			|| _bCurrentUI == OSD_UI_DIGEST 
#endif
			|| _bCurrentUI == OSD_UI_DVD_PROGRAM
			|| _bCurrentUI == OSD_UI_FM // Brian1.07
			|| _bCurrentUI == OSD_UI_SEARCH) // Brian1.10-2
			_bOSDTemp = FALSE;
		break;  
		
#else //#ifdef SHOW_6_DISPLAY_MODE                
    case 1: // Line Display mode
        if (_bCurrentUI == OSD_UI_DISPLAY)
            _bOSDTemp = OSDLD_Update(MSG_CLEAR, bMessage);
        else if (_bCurrentUI == OSD_UI_THUMBNAIL
            // Brian1.00
            // for the following cases, we stil need to clear NU and NB message
            // [1] Digest mode and Display mode 1 is on
            // [2] DVD Program and Display mode 1 is on
            // [3] FM and Display mode 1 is on
            // [4] Goto Time / Search and Display mode 1 is on
            //LJY1.20, support 4M flash, remove digest
#ifndef NO_DIGEST	                            
            || _bCurrentUI == OSD_UI_DIGEST 
#endif
            || _bCurrentUI == OSD_UI_DVD_PROGRAM
            || _bCurrentUI == OSD_UI_FM // Brian1.07
            || _bCurrentUI == OSD_UI_SEARCH) // Brian1.10-2
            _bOSDTemp = FALSE;
        break;
	case 2: // Virtual Panel mode
		if (_bCurrentUI == OSD_UI_DISPLAY)
			_bOSDTemp = OSDVP_Update(MSG_CLEAR, bMessage);
		// Brian1.00
		// for the following cases, we stil need to clear NU and NB message
		// [1] DVD Program and Display mode 2 is on
        //CoCo1.24a, to fix the normal bottom message is not cleared when Search UI.
		else if ((_bCurrentUI == OSD_UI_DVD_PROGRAM) || (_bCurrentUI == OSD_UI_SEARCH))
			_bOSDTemp = FALSE;
		
		break;
#endif // #ifdef SHOW_6_DISPLAY_MODE 					
	default: // Normal Display Mode
		_bOSDTemp = FALSE;      
	}
	
	if (!_bOSDTemp)
	{
		
		if (! (_bCurrentUI == OSD_UI_DVD_PROGRAM && _pOSDCurMsg == &_OSDNBCurMsg)) // Brian1.00-2, Program mode don't clear NB message
			OSDND_Update(MSG_CLEAR, bMessage);			
		
		// if it is FMUI, CDDA, Thumbnail..., needs recovery
        _OSD_RecoverUI(bMessage);		
	}
	
}


//  *******************************************************************
//  Function    :   _OSD_RecoverUI
//  Description :       Clear the message from the Display
//  Arguments   :   bMessage: the message to clear
//  Return      :   void
//                                      
//  Side Effect :
//  *******************************************************************
void _OSD_RecoverUI(BYTE bMessage)
{
	_bOSDTemp = OSDND_GetMessagePos(bMessage);
	switch (_bOSDTemp)
	{
		
	case OSDND_UPPER_RIGHT_REGION:
		_bOSDTemp = OSD_MSG_RECOVER_UPPPER_REGION;
		break;
	case OSDND_BOTTOM_REGION:
		_bOSDTemp = OSD_MSG_RECOVER_BOTTOM_REGION;
		break;
	default:
		// error
#ifdef SUPPORT_PRINTF
		_printf("_OSD_RecoverUI Error: unknow region\n");
#endif
		return;
	}
	
	switch (_bCurrentUI)
	{
	case OSD_UI_FM:
		// Brian1.07a, the purpose is to recover the NB help text
		// and we only need to recover the help text when some NB message timeout
		if (_bNBTimeOut) 
			OSDFM_Update(_bOSDTemp);
		break;                
#ifdef SUPPORT_FM_BUTTONS // Brian1.10
	case OSD_UI_PROGRAM_LIST:
		// Brian1.07a, the purpose is to recover the NB help text
		// and we only need to recover the help text when some NB message timeout
		if (_bNBTimeOut)
			OSDPL_Update(_bOSDTemp);
		break;
#endif
	case OSD_UI_THUMBNAIL:
#ifndef SUPPORT_FM_BUTTONS 
        if (_bNUTimeOut) //CoCo2.39, fix the recovery problem.
#endif
		    THUMBNAIL_Recover(_bOSDTemp); // Brian1.10
		break;
	}
	
}


//  *******************************************************************
//  Function    :   _OSD_ProcessNoneDisplayMessage
//  Description :       process none string display message
//  Arguments   :   bMessage, wParam, bSec
//  Return      :   TRUE: message has been processed
//                                      FALSE: message is not processed
//  Side Effect :
//  *******************************************************************
BYTE _OSD_ProcessNoneDisplayMessage(BYTE bMessage, WORD wParam, BYTE bSec)
{
    switch(bMessage)
    {
		// LLY2.82
		// Receiving this message (with bSec equals 0) means clearing the FM UI
		// CC will send this message, and FM will also send it while switching to Slide Show
    case    MSG_MP3_MENU:
        
        if(!bSec)
        {
            // Leave FM
            GDI_ClearRegion(0);

#ifdef MINI_OSD_REGION //CoCo.230, set the normal OSD region.
            _OSD_SetNormalOSDRegion();
            GDI_InitialRegion (0); // initialize region to set it to 4-bit mode
#endif			
            // Brian1.07, since 1.07, we support FM On/Off. need special handle here 
            OSDND_Update(MSG_DEFAULT_STATE, 0);
            if (_bCurrentUI == OSD_UI_DISPLAY)
            {
                // some places will issue OSD_OUTPUT_MACRO(MSG_MP3_MENU, 0x0, 0x0), for example when open tray
                // in this case, we will see LD flash several times
                _bCurrentUI = OSD_UI_NONE;
                break;
            }
            // Brian1.07, switch to Display mode 1 according to the __bDisplay
            // this is for FM off, we may need to bring up the display mode 1
            gcShowStatus.bOsdDisplay = __bDisplay;
            wParam = __bDisplay;           			
        }
		
    case    MSG_DISPLAY:
#ifdef SHOW_6_DISPLAY_MODE   //ch00.105
		
		if (wParam == 6) //wendy.105
        {
			if (_OSDNUCurMsg.bMessage != MSG_NULL)
			{
				//Brian0.86-2, for insurance, just clear the while region
				//GDI_ClearRegion(__bCurrentRegionId);
				//Brian1.05, just clear Line Display area, so the NU/NB message still keep
				OSDLD_Update(MSG_CLEAR_ALL, NULL);
			}        
			
			_bCurrentUI = OSD_UI_DISPLAY;
			_OSDLD_ShowItem(MSG_DIS_OFF);
			__dwDisplayStartTimer = UTL_GetSysTimer();//(WORD)__dwCountSystem; 
        }
        else if ((wParam == 2)||(wParam == 3)||(wParam == 4)||(wParam == 5)) //line display
        {
			if(__wDiscType & BOOK_M1) //XULI1015
				__dwDisplayStartTimer = 0;
			else
				__dwDisplayStartTimer = UTL_GetSysTimer();//xuli1015,(WORD)__dwCountSystem;				
			
			
			if (_OSDNUCurMsg.bMessage != MSG_NULL)
			{
				//Brian0.86-2, for insurance, just clear the while region
				//GDI_ClearRegion(__bCurrentRegionId);
				//Brian1.05, just clear Line Display area, so the NU/NB message still keep
				OSDLD_Update(MSG_CLEAR_ALL, NULL);
			}
			
			OSDVP_Update(MSG_CLEAR_ALL, NULL); //wendy.105
			_OSD_DisplayLD(); //++CoCo1.21
        }
        else if(wParam == 1) //virtual panel
        {
			__dwDisplayStartTimer = 0;//xuli1015
			
			if (_OSDNBCurMsg.bMessage == MSG_ANGLE_CTL)
			{
				//OSD_OUTPUT_PROCESS_MACRO(_OSDNUCurMsg.bMessage, _OSDNUCurMsg.wParam, 0);
				
				// clear the message directly instead of calling OSD_OUTPUT_PROCESS_MACRO
				// because it is in VP mode now, it "handle" all the Normal Up message in its own area
				// calling OSD_OUTPUT_PROCESS_MACRO with VP mode will clear the message area of VP,
				// not the Normal Up area we want to clear.
				OSDND_Update(MSG_CLEAR, _OSDNBCurMsg.bMessage);
				//_OSDNUCurMsg.bMessage = MSG_NULL;
			}
			
			_OSD_DisplayVP();
        }
        
		
#else//#ifdef SHOW_6_DISPLAY_MODE   //ch00.105              
        if (wParam == 1)
        {			
			// Brian0.84-2nd, clear the normal up message first (and no need to trigger to clear the message later)
			if (_OSDNUCurMsg.bMessage != MSG_NULL)
			{
				OSDLD_Update(MSG_CLEAR_ALL, NULL);
			}
			_OSD_DisplayLD(); //++CoCo1.21
        }
        else if (wParam == 2)
        {		
			if (_OSDNBCurMsg.bMessage == MSG_ANGLE_CTL)
			{
				//OSD_OUTPUT_PROCESS_MACRO(_OSDNUCurMsg.bMessage, _OSDNUCurMsg.wParam, 0);
				
				// clear the message directly instead of calling OSD_OUTPUT_PROCESS_MACRO
				// because it is in VP mode now, it "handle" all the Normal Up message in its own area
				// calling OSD_OUTPUT_PROCESS_MACRO with VP mode will clear the message area of VP,
				// not the Normal Up area we want to clear.
				OSDND_Update(MSG_CLEAR, _OSDNBCurMsg.bMessage);
			}
			
			OSDLD_Update(MSG_CLEAR_ALL, NULL);
			_OSD_DisplayVP(); //++CoCo1.21
			
			if (_OSDNUCurMsg.bMessage != MSG_NULL)
			{
				OSDVP_Update(_OSDNUCurMsg.bMessage, _OSDNUCurMsg.wParam);
			}
        }
#endif //#ifdef SHOW_6_DISPLAY_MODE   //ch00.105		
        else
        {
#ifndef SAMLL_DISPLAY_MODE_2 //CoCo2.31, show small display mode.
			_bOSDVPStage = 0;
#endif

#ifdef SHOW_6_DISPLAY_MODE
			__dwDisplayStartTimer = 0; //clear the display timer
			OSDLD_Update(MSG_CLEAR_ALL, NULL); //XULI1.07 because the LD region is redefined and maybe cannot be coverd by VP		
#endif
						
			OSDVP_Update(MSG_CLEAR_ALL, NULL);
			_bCurrentUI = OSD_UI_NONE;
			
			if (_OSDNUCurMsg.bMessage != MSG_NULL)
			{
				OSDND_Update(_OSDNUCurMsg.bMessage, _OSDNUCurMsg.wParam);
			}
			
			if (__bAGLN == 0)
			{
				_ClearAngleMsgFromStack();
				if (_OSDNBCurMsg.bMessage == MSG_ANGLE_CTL)
					_OSDNBCurMsg.bMessage = MSG_NULL;
			}
			if (_OSDNBCurMsg.bMessage == MSG_ANGLE_CTL)
			{
				OSDND_Update(_OSDNBCurMsg.bMessage, _OSDNBCurMsg.wParam);
				
			}
        }
        break;
		
		// LLY2.82, porting the code again
		// Because, the procedure has update within WinDVD 2.80
    case    MSG_LOGO:
        if(wParam==OSD_LOGO_CLEAR) // clear logo case
        {
            __bLOGO=LOGO_NONE;
        }
        else  // turn on logo case
        {
#ifndef NO_DIGEST //LJY1.20, support 4M flash, remove digest            
            __btDIGEST=FALSE;  // turn off digest mode
#endif
            if(wParam==OSD_LOGO_DEFAULT || wParam==OSD_LOGO_FROM_OPEN)
            {
                if(__bLOGO==LOGO_DEFAULT) // if logo turn on, don't re-draw it
                    break;
                //LJY1.10, pre-stop not show logo for CDG

⌨️ 快捷键说明

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