Update renderd7.cpp

This commit is contained in:
tobid7 2021-12-05 23:46:00 +01:00 committed by GitHub
parent 4bacf86367
commit f3111623c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ std::string dspststus = "Not Initialisized!";
int cobj___;
int maxobj__;
//INI::INIFile cfgfile;
std::unique_ptr<INI::INIFile> 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()