From f3111623c174156d9ef46580cbeefd5c5aa81124 Mon Sep 17 00:00:00 2001 From: Tobi Date: Sun, 5 Dec 2021 23:46:00 +0100 Subject: [PATCH] Update renderd7.cpp --- renderd7.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/renderd7.cpp b/renderd7.cpp index de13dee..c7a99b9 100644 --- a/renderd7.cpp +++ b/renderd7.cpp @@ -15,6 +15,7 @@ std::string dspststus = "Not Initialisized!"; int cobj___; int maxobj__; + //INI::INIFile cfgfile; std::unique_ptr cfgfile = nullptr; INI::INIStructure cfgstruct; @@ -39,9 +40,12 @@ float d11framerate = 0; //Metrik------------------------------------- u32 mt_color; u32 mt_txtcolor; + int mt_screen; +//int mt_width = mt_screen ? 320 : 400; float mt_txtSize; bool metrikd = false; +double mt_fpsgraph[320]; //------------------------------------------- bool currentScreen = false; @@ -246,6 +250,7 @@ void frameloop() last_time = osGetTime(); } d11framerate = current_fps; + mt_fpsgraph[320] = current_fps; } float getframerate() { @@ -830,8 +835,12 @@ void RenderD7::DrawMetrikOvl() RenderD7::OnScreen(Bottom); } RenderD7::DrawText(0, 0, mt_txtSize, mt_txtcolor, "FPS: " + RenderD7::GetFramerate()); - RenderD7::DrawText(0, 50, mt_txtSize, mt_txtcolor, "CPU: " + std::to_string(C3D_GetProcessingTime()*6.0f) + "/" + std::to_string(C3D_GetProcessingTime())); - RenderD7::DrawText(0, 70, mt_txtSize, mt_txtcolor, "GPU: " + std::to_string(C3D_GetDrawingTime()*6.0f) + "/" + std::to_string(C3D_GetDrawingTime())); + //RenderD7::DrawText(0, 50, mt_txtSize, mt_txtcolor, "CPU: " + std::to_string(C3D_GetProcessingTime()*6.0f) + "/" + std::to_string(C3D_GetProcessingTime())); + //RenderD7::DrawText(0, 70, mt_txtSize, mt_txtcolor, "GPU: " + std::to_string(C3D_GetDrawingTime()*6.0f) + "/" + std::to_string(C3D_GetDrawingTime())); + for (int z = 0; z < 320; z++) + { + C2D_DrawLine(z, 239 - mt_framegraph[z], mt_txtcolor, z + 1, 239 - mt_framegraph[z + 1], mt_txtcolor, 1, 1); + } } /*RenderD7::Console::Console()