📄 osd.c
字号:
case MSG_PAUSE:
case MSG_SLOW:
case MSG_SCANFORWARD:
case MSG_SCANBACKWARD:
case MSG_FREEZE:
// update the play mode
gcShowStatus.bPlayingMode=bMessage;
// update the speed factor
// now the speed factor is valid for SCF/SCB/SLOW only
// DVD.039, OSD display is level * 2
//_bSpeedFactor=LOBYTE(wParam);
_bSpeedFactor=1;
for(_bIdex=0; _bIdex<(BYTE)(wParam); _bIdex++)
{
_bSpeedFactor*=2;
}
break;
case MSG_TVMODE:
// update the TV mode
gcShowStatus.bTVMODE=LOBYTE(wParam);
break;
case MSG_DISPLAY:
// update the DISPLAY mode status
gcShowStatus.bOsdDisplay=LOBYTE(wParam);
break;
//alex1.22a,20040204 combine gototime , search,bookmark
//Remove gcShowStatus.bSetTime in _OSD_UpdateStatus
/**********************************************************************/
/*
case MSG_SETGOTOTIME:
// update the GOTOTIME mode status
gcShowStatus.bSetTime=LOBYTE(wParam);
break;
*/
// DVD.036
case MSG_SETSEARCH:
// update the SEARCH mode status
gcShowStatus.bSetSearch=LOBYTE(wParam);
gcShowStatus.bSearch=TRUE; // DVD.039
// if( wParam != OSD_ENTER_SEARCH )
if(( wParam != OSD_INPUT_TITLE_CHAPTER ) && ( wParam != OSD_INPUT_TIME ))
gcShowStatus.bSearch=FALSE;
//alex1.22a,20040210 remove double define osd part #11
//if(wParam==OSD_COMPLETE_SEARCH) //XULI0106
if(wParam==OSD_COMPLETE_TIME) //XULI0106
_OSD_OutputProcess(MSG_PLAYING, 0, 0);
/**********************************************************************/
break;
// DVD.036
case MSG_SEARCH:
gcShowStatus.bSearch=TRUE;
break;
case MSG_MOTION:
// update the play item mode
// wParam=TRUE, means play motion, otherwise play STILL
gcShowStatus.bStill=!LOBYTE(wParam);
break;
case MSG_OPEN:
case MSG_POWER:
if (bMessage==MSG_POWER)
{
gcShowStatus.bPowerDown=LOBYTE(wParam);
__bLOGO=LOGO_NONE; // FALSE;
if (wParam)
{
GDI_ClearRegion(0);
}
}
// set play mode as STOP
gcShowStatus.bPlayingMode=MSG_STOP;
break;
// LLY.099, let clear __bLOGO flag action by caller to use MSG_LOGO w/ OSD_LOGO_CLEAR
case MSG_TRACK:
// update the current play track
gcShowStatus.wCurrentTrack=wParam;
gcShowStatus.wCurrentTime=0;
break;
default:
// other messages do not need update gcShowStatus
break;
}
// DVD.036
if(gcShowStatus.bSearch)
{
_bDispTitle=__bSearchTitle;
_wDispChapter=__wSearchChapter;
_wDispChapter_Ns_Title=__wSearchChapter_Ns_Title;
}
else
{
_bDispTitle=__bTitle;
_wDispChapter=__wChapter;
_wDispChapter_Ns_Title=__wChapter_Ns_Title;
}
}
//================================================================
//================================================================
//================================================================
void OSD_Initial(void)
{
//Brian0.84p
#ifdef CT908_UI
GDI_Initial();
#endif
_bOSDAppMode = OSD_APPMODE_NORMAL; // Brian1.00-3
#ifndef SAMLL_DISPLAY_MODE_2 //CoCo2.31, show small display mode.
_bOSDVPStage = 0;
#endif
_bNBTimeOut = FALSE; // Brian1.07a
_bNUTimeOut = FALSE; //CoCo2.39, fix the recovery problem.
#ifndef GDI_4_BIT_OSD //CoCo2.31, Only 4-bit mode needs to initialize palette.
OSDND_Update(MSG_INITIAL_PALETTE, 0);
OSDVP_Update(MSG_INITIAL_PALETTE, 0);
OSDLD_Update(MSG_INITIAL_PALETTE, 0);
#endif
OSDND_Update(MSG_DEFAULT_STATE, 0);
_bOSDLang = (__SetupInfo.bOSDLanguage - SETUP_LANGUAGE_OSD_BASE); //1; // set this base on (SETUP_DEFAULT_OSD_LANGUAGE - SETUP_LANGUAGE_OSD_BASE)
__bDisplay = 0; //Brian0.83
#ifdef SHOW_6_DISPLAY_MODE
__dwDisplayStartTimer=0;
__bTitleMenu=0;
__bRootMenu=0;
#endif //#ifdef SHOW_6_DISPLAY_MODE
_bCurrentUI = OSD_UI_NONE;
_bPreviousUI = OSD_UI_NONE; //Brian0.83
_bVolDisplayed = 0; //FALSE; // Brian1.00
_bIsDisplayModeMessage = FALSE;
_OSDNUCurMsg.bMessage = MSG_NULL;
_OSDNBCurMsg.bMessage = MSG_NULL;
_bOSDNUIndex = 0;
_bOSDNBIndex = 0;
for (_bOSDTemp=0; _bOSDTemp<MAX_DEPTH_OF_MSG_STACK; _bOSDTemp++)
{
_OSDNUStack[_bOSDTemp].bMessage = MSG_NULL;
_OSDNBStack[_bOSDTemp].bMessage = MSG_NULL;
}
//Brian1.26, clear VCD3.0 highlight
HAL_VCD30_Area(FALSE);
_bOSDInitial = TRUE;
_bWaitingCnt=2; //CoCo2.31, set _bWaitingCnt to the initial value here.
}
// *******************************************************************
// Function : _SetCurMsgPtr
// Description : Set the _pOSDCurMsg pointer to NU or NB current Msg
// Arguments : bMessage: check the message to decide the corner
// Return : none
//
// Side Effect :
// *******************************************************************
void _SetCurMsgPtr(BYTE bMessage)
{
_bOSDTemp = OSDND_GetMessagePos(bMessage);
switch (_bOSDTemp)
{
case OSDND_UPPER_RIGHT_REGION:
_pOSDCurMsg = &_OSDNUCurMsg;
//_pOSDStack = _OSDNUStack;
break;
case OSDND_BOTTOM_REGION:
_pOSDCurMsg = &_OSDNBCurMsg;
//_pOSDStack = _OSDNBStack;
break;
default:
_pOSDCurMsg = NULL;
break;
}
}
// *******************************************************************
// Function : _OSD_PushMessageToStack
// Description : Push the current message into stack (according to region)
// Arguments : None
// Return : None
//
// Side Effect :
// *******************************************************************
void _OSD_PushMessageToStack(void)
{
_bOSDTemp = OSDND_GetMessagePos(_pOSDCurMsg->bMessage);
switch (_bOSDTemp)
{
case OSDND_UPPER_RIGHT_REGION:
_pbOSDStackIndex = &_bOSDNUIndex;
_pOSDStack = _OSDNUStack;
break;
case OSDND_BOTTOM_REGION:
_pbOSDStackIndex = &_bOSDNBIndex;
_pOSDStack = _OSDNBStack;
break;
default:
// error
#ifdef SUPPORT_PRINTF
_printf("_OSD_PushMessageToStack Error: unknow region\n");
#endif
return;
}
if (*_pbOSDStackIndex >= MAX_DEPTH_OF_MSG_STACK)
{
// stack full
#ifdef SUPPORT_PRINTF
_printf("_OSD_PushMessageToStack Error: Stack Overflow\n");
#endif
return;
}
_pOSDStack[*_pbOSDStackIndex].bMessage = _pOSDCurMsg->bMessage;
_pOSDStack[*_pbOSDStackIndex].wParam = _pOSDCurMsg->wParam;
_pOSDStack[*_pbOSDStackIndex].bSec = _pOSDCurMsg->bSec;
//(*_pbOSDStackIndex)++;
// Brian1.20, reduce CODE lib size
_bOSDTemp1 = *_pbOSDStackIndex;
_bOSDTemp1++;
*_pbOSDStackIndex = _bOSDTemp1;
}
// *******************************************************************
// Function : _OSD_PopMessageFromStack
// Description : Pop the current message from stack and put it into current mesage
// Return : TRUE: a message has been popped out.
// FASLE: no message is popped out.
//
// Side Effect :
// *******************************************************************
BYTE _OSD_PopMessageFromStack(BYTE bCorner)
{
switch (bCorner)
{
case OSDND_UPPER_RIGHT_REGION:
_pOSDCurMsg = &_OSDNUCurMsg;
_pbOSDStackIndex = &_bOSDNUIndex;
_pOSDStack = _OSDNUStack;
break;
case OSDND_BOTTOM_REGION:
_pOSDCurMsg = &_OSDNBCurMsg;
_pbOSDStackIndex = &_bOSDNBIndex;
_pOSDStack = _OSDNBStack;
break;
default:
// error
#ifdef SUPPORT_PRINTF
_printf("_OSD_PushMessageToStack Error: unknow region\n");
#endif
return FALSE;
}
for (_bOSDTemp = (*_pbOSDStackIndex); _bOSDTemp>0; _bOSDTemp--)
{
//(*_pbOSDStackIndex)--;
// Brian1.20, reduce CODE lib size
_bOSDTemp1 = *_pbOSDStackIndex;
_bOSDTemp1--;
*_pbOSDStackIndex = _bOSDTemp1;
if (_pOSDStack[*_pbOSDStackIndex].bMessage != MSG_NULL)
{
_pOSDCurMsg->bMessage = _pOSDStack[*_pbOSDStackIndex].bMessage;
_pOSDCurMsg->wParam = _pOSDStack[*_pbOSDStackIndex].wParam;
_pOSDCurMsg->bSec = _pOSDStack[*_pbOSDStackIndex].bSec;
return TRUE;
}
}
return FALSE;
}
// *******************************************************************
// Function : _OSD_DisplayMessage
// Description : Clear the message from the Display
// Arguments : bMessage: the message to clear
// Return : void
//
// Side Effect :
// *******************************************************************
void _OSD_DisplayMessage(BYTE bMessage, WORD wParam)
{
_bOSDTemp = TRUE;
#ifdef SHOW_6_DISPLAY_MODE //CH00.105
switch(__bDisplay)
{
case 1: // 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))
{
_bOSDTemp = FALSE; // set to FASLE, ND will handle it.
}
break;
case 2:
case 3:
case 4:
case 5:
// case 6:
if (_bCurrentUI == OSD_UI_DISPLAY)
{
_bOSDTemp = OSDLD_Update(bMessage, wParam);
}
else if (_bCurrentUI == OSD_UI_THUMBNAIL)
{
// 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;
default: // Normal Display Mode
_bOSDTemp = FALSE;
}
if (!_bOSDTemp && _pOSDCurMsg)
{
_bOSDTemp = OSDND_GetMessagePos(_pOSDCurMsg->bMessage);
OSDND_Update(bMessage, wParam);
}
#else //#ifdef SHOW_6_DISPLAY_MODE //CH00.105
switch(__bDisplay)
{
case 1: // Line Display mode
if (_bCurrentUI == OSD_UI_DISPLAY)
{
_bOSDTemp = OSDLD_Update(bMessage, wParam);
}
else if (_bCurrentUI == OSD_UI_THUMBNAIL)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -