mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
dont show fps during demo render
This commit is contained in:
parent
8d2de4b8c2
commit
3ad0e233ee
|
@ -492,7 +492,12 @@ void CHud::RenderWarmupTimer()
|
|||
|
||||
void CHud::RenderTextInfo()
|
||||
{
|
||||
if(g_Config.m_ClShowfps)
|
||||
int Showfps = g_Config.m_ClShowfps;
|
||||
#if defined(CONF_VIDEORECORDER)
|
||||
if(IVideo::Current())
|
||||
Showfps = 0;
|
||||
#endif
|
||||
if(Showfps)
|
||||
{
|
||||
// calculate avg. fps
|
||||
m_FrameTimeAvg = m_FrameTimeAvg * 0.9f + Client()->RenderFrameTime() * 0.1f;
|
||||
|
@ -528,7 +533,7 @@ void CHud::RenderTextInfo()
|
|||
{
|
||||
char aBuf[64];
|
||||
str_from_int(Client()->GetPredictionTime(), aBuf);
|
||||
TextRender()->Text(m_Width - 10 - TextRender()->TextWidth(12, aBuf, -1, -1.0f), g_Config.m_ClShowfps ? 20 : 5, 12, aBuf, -1.0f);
|
||||
TextRender()->Text(m_Width - 10 - TextRender()->TextWidth(12, aBuf, -1, -1.0f), Showfps ? 20 : 5, 12, aBuf, -1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -426,8 +426,13 @@ void CInfoMessages::OnRender()
|
|||
Graphics()->MapScreen(0, 0, Width, Height);
|
||||
Graphics()->SetColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
int Showfps = g_Config.m_ClShowfps;
|
||||
#if defined(CONF_VIDEORECORDER)
|
||||
if(IVideo::Current())
|
||||
Showfps = 0;
|
||||
#endif
|
||||
const float StartX = Width - 10.0f;
|
||||
const float StartY = 30.0f + (g_Config.m_ClShowfps ? 100.0f : 0.0f) + (g_Config.m_ClShowpred && Client()->State() != IClient::STATE_DEMOPLAYBACK ? 100.0f : 0.0f);
|
||||
const float StartY = 30.0f + (Showfps ? 100.0f : 0.0f) + (g_Config.m_ClShowpred && Client()->State() != IClient::STATE_DEMOPLAYBACK ? 100.0f : 0.0f);
|
||||
|
||||
float y = StartY;
|
||||
for(int i = 1; i <= MAX_INFOMSGS; i++)
|
||||
|
|
Loading…
Reference in a new issue