📄 guiapp_action_aboutmenu.c
字号:
/*****************************************************************************
** TEXAS INSTRUMENTS PROPRIETARY INFORMATION
**
** (c) Copyright, Texas Instruments Incorporated, 2006.
** All Rights Reserved.
**
** Property of Texas Instruments Incorporated. Restricted Rights -
** Use, duplication, or disclosure is subject to restrictions set
** forth in TI's program license agreement and associated documentation.
******************************************************************************/
#include "common.h"
#include "guiStyle.h"
#include "guiApp_action.h"
#include "api_ver.h"
#include "version.h"
#include "osd.h"
#include "app_cfg.h"
#include "datapath.h"
#include "illumination.h"
#include <stdio.h>
/* Initialize the items */
int08 guiApp_action_AboutMenu_OnStart( int16 menuId, GUIMSG *msg )
{
API_VERSION apiver;
uint08 string[20];
int32 osdver;
DP_SOURCEDESC *srcDesc;
uint32 lampHours;
DP_CONNECTOR activeSource;
datapath_GetSourceDesc( &srcDesc );
snprintf((char *)string, 16, "%d.%d.%X", SW_VER_MAJOR, SW_VER_MINOR, SW_VER_PATCH );
guiStyle_item_SetTextString( ITEM_SWVERSIONITEM, string );
osdver = OSD_GetVersionID();
snprintf((char *)string, 16, "%d.%d.%d.%d", osdver>>24, (osdver>>16)&0xff, (osdver>>8)&0xff, osdver&0xff );
guiStyle_item_SetTextString( ITEM_OSDVERSIONITEM, string );
apiver = API_GetVersion();
snprintf((char *)string, 16, "%d.%d.%X", apiver.API_Bits.Major, apiver.API_Bits.Minor, apiver.API_Bits.Patch );
guiStyle_item_SetTextString( ITEM_APIVERSIONITEM, string );
activeSource = datapath_GetActiveDisplay();
switch( activeSource )
{
case SVIDEO:
snprintf((char *)string, 16, "%s", "SVIDEO" );
break;
case COMPONENT:
snprintf((char *)string, 16, "%s", "COMPONENT" );
break;
case COMPOSITE:
snprintf((char *)string, 16, "%s", "COMPOSITE" );
break;
case VGA:
snprintf((char *)string, 16, "%s", "VGA" );
break;
case DVI:
snprintf((char *)string, 16, "%s", "DVI" );
break;
case TESTPATTERN:
snprintf((char *)string, 16, "%s", "TEST PATTERN" );
break;
case SPLASH:
snprintf((char *)string, 16, "%s", "SPLASH" );
break;
case BLANKSCREEN:
case NOSOURCE:
snprintf((char *)string, 16, "%s", "BLANK SCREEN" );
break;
default:
snprintf((char *)string, 16, "%s", "UNKNOWN" );
break;
}
guiStyle_item_SetTextString( ITEM_SOURCEITEM, string );
snprintf((char *)string, 20, "%dx%d %3d.%02.2dHz", srcDesc->nativeWidth, srcDesc->nativeHeight, (uint16)srcDesc->inputFrameRate, ((uint16)(srcDesc->inputFrameRate * 100 )) % 100 );
guiStyle_item_SetTextString( ITEM_RESOLUTIONITEM, string );
lampHours = illum_lampHoursGet();
/* set arbitrary max hours, not used for display */
guiStyle_item_SetSingleValue( ITEM_LAMPHOURSITEM, lampHours, 0, 20000 );
return PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -