mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
[Fix] Revive FPS drawing overlay
To enable built-in FPS, change gbFPSDisplay to SHOW_FULL_FPS (1) in debugger (or change it in src code and rebuild).
This commit is contained in:
+15
-28
@@ -122,46 +122,33 @@ void DisplayFrameRate( )
|
||||
uiFrameCount = 0;
|
||||
}
|
||||
|
||||
// Create string
|
||||
SetFont( SMALLFONT1 );
|
||||
|
||||
//DebugMsg(TOPIC_JA2, DBG_LEVEL_0, String( "FPS: %d ", __min( uiFPS, 1000 ) ) );
|
||||
|
||||
if ( uiFPS < 20 )
|
||||
{
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_MCOLOR_LTRED );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFontBackground( FONT_MCOLOR_BLACK );
|
||||
SetFontForeground( FONT_MCOLOR_DKGRAY );
|
||||
}
|
||||
|
||||
if ( gbFPSDisplay == SHOW_FULL_FPS )
|
||||
{
|
||||
memset(&VideoOverlayDesc, 0, sizeof(VideoOverlayDesc));
|
||||
|
||||
// FRAME RATE
|
||||
memset( &VideoOverlayDesc, 0, sizeof( VideoOverlayDesc ) );
|
||||
swprintf( VideoOverlayDesc.pzText, L"%ld", __min( uiFPS, 1000 ) );
|
||||
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT;
|
||||
VideoOverlayDesc.uiFontID = SMALLFONT1;
|
||||
VideoOverlayDesc.ubFontBack = FONT_MCOLOR_BLACK;
|
||||
VideoOverlayDesc.ubFontFore = uiFPS < 20 ? FONT_MCOLOR_LTRED : FONT_MCOLOR_DKGRAY;
|
||||
swprintf( VideoOverlayDesc.pzText, L"FPS: %ld", __min( uiFPS, 1000 ) );
|
||||
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT | VOVERLAY_DESC_FONT | VOVERLAY_DESC_DISABLED;
|
||||
UpdateVideoOverlay( &VideoOverlayDesc, giFPSOverlay, FALSE );
|
||||
|
||||
// TIMER COUNTER
|
||||
swprintf( VideoOverlayDesc.pzText, L"%ld", __min( giTimerDiag, 1000 ) );
|
||||
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT;
|
||||
swprintf( VideoOverlayDesc.pzText, L"Frame: %04ld ms", __min( giTimerDiag, 10000 ) );
|
||||
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT | VOVERLAY_DESC_DISABLED;
|
||||
UpdateVideoOverlay( &VideoOverlayDesc, giCounterPeriodOverlay, FALSE );
|
||||
|
||||
|
||||
if( GetMouseMapPos( &usMapPos) )
|
||||
{
|
||||
//if( GetMouseMapPos( &usMapPos) )
|
||||
//{
|
||||
//gprintfdirty( 0, 315, L"(%d)",sMapPos);
|
||||
//mprintf( 0,315,L"(%d)",sMapPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
//gprintfdirty( 0, 315, L"(%d %d)",gusMouseXPos, gusMouseYPos - INTERFACE_START_Y );
|
||||
//mprintf( 0,315,L"(%d %d)",gusMouseXPos, gusMouseYPos - INTERFACE_START_Y );
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
if ( ( gTacticalStatus.uiFlags & GODMODE ) )
|
||||
|
||||
Reference in New Issue
Block a user