mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 11:19:07 +00:00
Changed: Display fps and spf on SHIFT+F2
This commit is contained in:
parent
fd9fb09cb6
commit
f17ae80931
2 changed files with 6 additions and 4 deletions
|
@ -71,7 +71,9 @@ class CAHDisplayInfos : public IActionHandler
|
||||||
{
|
{
|
||||||
// can only be used by devs and CSR or in local mode
|
// can only be used by devs and CSR or in local mode
|
||||||
#if FINAL_VERSION
|
#if FINAL_VERSION
|
||||||
|
# ifdef NL_OS_WINDOWS
|
||||||
if( ClientCfg.Local || hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeVG() )
|
if( ClientCfg.Local || hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeVG() )
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ShowInfos = (ShowInfos+1)%6;
|
ShowInfos = (ShowInfos+1)%6;
|
||||||
|
|
|
@ -3095,15 +3095,15 @@ void displayDebugFps()
|
||||||
line = 0.9f;
|
line = 0.9f;
|
||||||
// Ms per frame
|
// Ms per frame
|
||||||
{
|
{
|
||||||
|
float spf = smoothFPS.getSmoothValue ();
|
||||||
// Ms per frame
|
// Ms per frame
|
||||||
TextContext->printfAt(0.1f, line, "%.1f ms", smoothFPS.getSmoothValue ()*1000);
|
TextContext->printfAt(0.1f, line, "FPS %.1f ms - %.1f fps", spf*1000, 1.f/spf);
|
||||||
line-= lineStep;
|
line-= lineStep;
|
||||||
// More Smoothed Ms per frame
|
// More Smoothed Ms per frame
|
||||||
TextContext->printfAt(0.1f, line, "%.1f ms", moreSmoothFPS.getSmoothValue ()*1000);
|
spf = moreSmoothFPS.getSmoothValue ();
|
||||||
|
TextContext->printfAt(0.1f, line, "Smoothed FPS %.1f ms - %.1f fps", spf*1000, 1.f/spf);
|
||||||
line-= lineStep;
|
line-= lineStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static NLMISC::CRefPtr<CInterfaceElement> HighlightedDebugUI;
|
static NLMISC::CRefPtr<CInterfaceElement> HighlightedDebugUI;
|
||||||
|
|
Loading…
Reference in a new issue