Small refactor for app window's title

This commit is contained in:
tomcw
2020-08-17 19:26:06 +01:00
parent 221e35edc7
commit 039ad8a547
3 changed files with 20 additions and 12 deletions
+17 -6
View File
@@ -124,12 +124,6 @@ static LPDIRECTDRAW g_lpDD = NULL;
, "White Monitor"
};
const char *g_apVideoMonitorModeDesc[ 2 ] =
{
"Color (NTSC Monitor)"
, "Color (PAL Monitor)"
};
// Prototypes (Private) _____________________________________________
bool g_bDisplayPrintScreenFileName = false;
@@ -1442,3 +1436,20 @@ static void videoCreateDIBSection()
// CREATE THE OFFSET TABLE FOR EACH SCAN LINE IN THE FRAME BUFFER
NTSC_VideoInit( g_pFramebufferbits );
}
//===========================================================================
const char* VideoGetAppWindowTitle(void)
{
static const char *apVideoMonitorModeDesc[ 2 ] =
{
"Color (NTSC Monitor)",
"Color (PAL Monitor)"
};
const VideoType_e videoType = GetVideoType();
if ( videoType != VT_COLOR_MONITOR_NTSC)
return g_apVideoModeDesc[ videoType ];
else
return apVideoMonitorModeDesc[ GetVideoRefreshRate() == VR_60HZ ? 0 : 1 ]; // NTSC or PAL
}