📄 osddsply.c
字号:
break;
case MSG_TRACK:
if (__wDiscType & CDROM_M1) //For JPEG
{
//Update "file name" info.
_OSDDSPLY_LD_ShowInfo(MSG_FILE_NAME);
//Update "file num" info.
_OSDDSPLY_LD_ShowInfo(MSG_FILE_NUM);
}
else
{
_OSDDSPLY_LD_ShowInfo(bMessage);
}
break;
case MSG_ABSTIME:
case MSG_RELTIME:
case MSG_TITLE_TIME:
case MSG_CHAPTER_TIME:
case MSG_REMAIN_ABSTIME:
case MSG_REMAIN_RELTIME:
case MSG_REMAIN_TITLE_TIME:
case MSG_REMAIN_CHAPTER_TIME:
if (_OSDDSPLY_SameTimeType(bMessage))
{
_OSDDSPLY_LD_ShowTime(OSDDSPLY_UPDATE_INFO);
}
else
return FALSE;
break;
case MSG_STOP: //Throw away MSG_STOP to let normal display to display "stop"?
_wOSDDSPLYInfo = gcShowStatus.wCurrentTrack;
_OSDDSPLY_LD_UpdateUnknownRegions();
default:
return FALSE;
}
return TRUE;
}
//***************************************************************************
// Function : _OSDDSPLY_VP_Update
// Abstract : Call this function when you want to update the message for virtual panel.
// Arguments : bMessage: the message.
// Return : TRUE: The message has been updated.
// : FALSE: The message is not supported in the virtual panel.
// Side Effect : none.
// Notes :
//***************************************************************************
BYTE _OSDDSPLY_VP_Update(BYTE bMessage)
{
switch (bMessage)
{
case MSG_STOP:
#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
if (pOSDDSPTypeMode[_bOSDDSPLYMode].bDisplayModeID == OSDDSPLY_MODE_DVD_VIRTUAL_PANEL)
_OSDDSPLY_VP_UpdateUnknownRegions();
#endif //#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
return FALSE;
case MSG_ABSTIME:
case MSG_RELTIME:
case MSG_TITLE_TIME:
case MSG_CHAPTER_TIME:
case MSG_REMAIN_ABSTIME:
case MSG_REMAIN_RELTIME:
case MSG_REMAIN_TITLE_TIME:
case MSG_REMAIN_CHAPTER_TIME:
#ifndef SUPPORT_SIMPLE_DISPLAY_MODE
if (pOSDDSPTypeMode[_bOSDDSPLYMode].bDisplayModeID == OSDDSPLY_MODE_DVD_VIRTUAL_PANEL)
_OSDDSPLY_VP_ShowTime();
#endif
break;
case MSG_TRACK:
#ifndef SUPPORT_SIMPLE_DISPLAY_MODE
_OSDDSPLY_VP_ShowInfo(MSG_FILE_NAME);
_OSDDSPLY_VP_ShowInfo(MSG_FILE_NUM);
#endif
break;
default:
#ifdef SUPPORT_SIMPLE_DISPLAY_MODE
switch (bMessage)
{
case MSG_SPST_CTL:
case MSG_AST_CTL:
case MSG_ANGLE_CTL:
case MSG_JPEG_RESOLUTION:
case MSG_JPEG_DATE:
return _OSDDSPLY_VP_ShowInfo(bMessage);
default:
return FALSE;
}
#else
return _OSDDSPLY_VP_ShowInfo(bMessage);
#endif //SUPPORT_SIMPLE_DISPLAY_MODE
}
return TRUE;
}
//***************************************************************************
// Function : _OSDDSPLY_ClearDisplayModeUI
// Abstract : This function will switch each display mode.
// Arguments : none.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_ClearDisplayModeUI(void)
{
if (_bOSDDSPLYEnterTimeMode)
{
_OSDDSPLY_ClearBackground(OSDDSPLY_BACKGROUND_LD_TIME);
}
else
{
_OSDDSPLY_ClearBackground(pOSDDSPTypeMode[_bOSDDSPLYMode].bBackgroundType);
}
}
//***************************************************************************
// Function : _OSDDSPLY_SwitchDisplayModeUI
// Abstract : This function will switch each display mode.
// Arguments : none.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_SwitchDisplayModeUI(void)
{
if (_bOSDDSPLYMode == OSDDSPLY_MODE_NONE)
{
if (__wDiscType & BOOK_DVD) //Do initializztion
{
#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
pOSDDSPTypeMode = OSDDSPLYDVDMode;
_bOSDDSPLYNum = OSDDSPLY_DVD_DISPLAY_NUM;
#else
return;
#endif //#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
}
else if (__wDiscType & CDROM_M1) //For JPEG
{
if(__bAttrPlay == ATTR_JPG)
{
pOSDDSPTypeMode = OSDDSPLYJPEGMode;
_bOSDDSPLYNum = OSDDSPLY_JPEG_DISPLAY_NUM;
}
else if (__bAttrPlay == ATTR_AVI)
{
pOSDDSPTypeMode = OSDDSPLYCDROMDIVXMode;
_bOSDDSPLYNum = OSDDSPLY_CDROM_DIVX_DISPLAY_NUM;
}
else
{
pOSDDSPTypeMode = OSDDSPLYCDROMAudioMode;
_bOSDDSPLYNum = OSDDSPLY_CDROM_AUDIO_DISPLAY_NUM;
}
}
else
{
#ifndef NO_VCD_DISPLAY_UI //++CoCo2.37p
pOSDDSPTypeMode = OSDDSPLYVCDMode;
_bOSDDSPLYNum = OSDDSPLY_VCD_DISPLAY_NUM;
#else
return;
#endif //#ifndef NO_VCD_DISPLAY_UI //++CoCo2.37p
}
//Tell OSD that the Display mode UI enters.
OSD_ChangeUI(OSD_UI_DISPLAY, OSD_ENTER_UI);
#ifdef OSDDSPLY_SUPPORT_SHOW_CURRENT_DISPLAY_BEFORE_SWITCH
if (!_bOSDDSPLYEnterTimeMode)
#endif
_bOSDDSPLYMode++;
_bOSDDSPLYCursorIconIndex = 0; //Initialize the cursor's index for Navigator.
//Show the Display mode UI.
_OSDDSPLY_ShowDisplayModeUI(FALSE);
}
else if (_bOSDDSPLYMode == _bOSDDSPLYNum)
{
if (!_bOSDDSPLYEnterTimeMode)
{
//Clear current UI.
_OSDDSPLY_ClearDisplayModeUI();
_bOSDDSPLYMode = OSDDSPLY_MODE_NONE;
//Tell OSD that the Display mode UI exits.
OSD_ChangeUI(OSD_UI_DISPLAY, OSD_EXIT_UI);
}
else
{
_OSDDSPLY_ShowDisplayModeUI(FALSE);
}
}
else
{
#ifdef OSDDSPLY_SUPPORT_SHOW_CURRENT_DISPLAY_BEFORE_SWITCH
if (!_bOSDDSPLYEnterTimeMode)
#endif
_bOSDDSPLYMode++;
//Show the Display mode UI.
_OSDDSPLY_ShowDisplayModeUI(FALSE);
}
}
//***************************************************************************
// Function : _OSDDSPLY_ShowDisplayModeUI
// Abstract : This function will show each display mode UI.
// Arguments : none.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_ShowDisplayModeUI(BYTE bRecoverUI)
{
if (_bOSDDSPLYMode == OSDDSPLY_MODE_NONE)
{
return;
}
if (pOSDDSPTypeMode[_bOSDDSPLYMode-1].bBackgroundType == OSDDSPLY_BACKGROUND_NONE)
{
//Draw current Display mode background.
_OSDDSPLY_DrawBackground(pOSDDSPTypeMode[_bOSDDSPLYMode].bBackgroundType);
}
else
{
if (_bOSDDSPLYEnterTimeMode || (pOSDDSPTypeMode[_bOSDDSPLYMode].bBackgroundType != pOSDDSPTypeMode[_bOSDDSPLYMode-1].bBackgroundType))
{
//clear the previous Display mode UI background.
_OSDDSPLY_ClearBackground(pOSDDSPTypeMode[_bOSDDSPLYMode-1].bBackgroundType);
//Draw current Display mode background.
_OSDDSPLY_DrawBackground(pOSDDSPTypeMode[_bOSDDSPLYMode].bBackgroundType);
}
}
//Show each Display mode UI.
switch (pOSDDSPTypeMode[_bOSDDSPLYMode].bBackgroundType)
{
case OSDDSPLY_BACKGROUND_LD_GENERAL:
_bOSDDSPLYTemp = _bOSDDSPLYEnterTimeMode; //backup the "_bOSDDSPLYEnterTimeMode" mode
//Reset the "Time mode" here to prevent the background is not re-drawed.
_bOSDDSPLYEnterTimeMode = FALSE;
//_OSDDSPLY_LD_Show() will UTL_OutputShowTime() to show time immediately.
//If _bOSDDSPLYEnterTimeMode is not set to FALSE before calling _OSDDSPLY_LD_Show(), the position of the time will be wrong if UTL_OutputShowTime() call OSD_Trigger() at this time.
if (bRecoverUI || _bOSDDSPLYTemp)
_OSDDSPLY_LD_Show(TRUE);
else
_OSDDSPLY_LD_Show(FALSE);
//Initialize the time which the display mode UI starts.
_dwOSDDSPLYDisplayStartTime = OS_GetSysTimer();
break;
#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
case OSDDSPLY_BACKGROUND_VP_DVD:
//Set show time type
__bShowTimeType = MSG_TITLE_TIME;
_OSDDSPLY_VP_ShowDVDMode();
break;
#endif //#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
case OSDDSPLY_BACKGROUND_VP_JPEG:
_OSDDSPLY_VP_ShowJPEGMode();
break;
case OSDDSPLY_BACKGROUND_VP_DIVX:
_OSDDSPLY_VP_ShowDIVXMode();
break;
#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p
case OSDDSPLY_BACKGROUND_NAVIGATOR:
_OSDDSPLY_NAVIGATOR_ShowNavigator();
break;
#endif //#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p
default:
break;
}
}
//***************************************************************************
// Function : _OSDDSPLY_SetBackground
// Abstract :
// Arguments : bBackgroundType: the type of the background.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_SetBackground(BYTE bBackgroundType)
{
switch (bBackgroundType)
{
case OSDDSPLY_BACKGROUND_LD_GENERAL:
_OSDDSPLYRect.rect.wLeft = OSDDSPLY_LD_START_H;
_OSDDSPLYRect.rect.wTop = OSDDSPLY_LD_START_V;
_OSDDSPLYRect.rect.wRight = OSDDSPLY_LD_START_H + OSDDSPLY_LD_WIDTH;
_OSDDSPLYRect.rect.wBottom = OSDDSPLY_LD_START_V + OSDDSPLY_LD_HEIGHT;
break;
case OSDDSPLY_BACKGROUND_LD_TIME:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -