From fa493394b59e0c3ffa9961bb7c4012ba0ea7351b Mon Sep 17 00:00:00 2001 From: vl Date: Mon, 19 Jul 2010 10:11:00 +0200 Subject: [PATCH] Changed: Display fps and spf on SHIFT+F2 --- .../client/src/interface_v3/action_handler_debug.cpp | 2 ++ code/ryzom/client/src/main_loop.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp index eaa24e354..cfaeac55f 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp @@ -71,7 +71,9 @@ class CAHDisplayInfos : public IActionHandler { // can only be used by devs and CSR or in local mode #if FINAL_VERSION +# ifdef NL_OS_WINDOWS if( ClientCfg.Local || hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeVG() ) +# endif #endif { ShowInfos = (ShowInfos+1)%6; diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index d995c0ed8..f085844dc 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -3095,15 +3095,15 @@ void displayDebugFps() line = 0.9f; // Ms per frame { + float spf = smoothFPS.getSmoothValue (); // 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; // 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; } - - } static NLMISC::CRefPtr HighlightedDebugUI;