mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Tweaked the description and setting name for the GPU statistics overlay.
This commit is contained in:
parent
7b76aa005f
commit
885bf61df0
Binary file not shown.
|
@ -678,9 +678,9 @@ void GuiMenu::openOtherSettings()
|
|||
|
||||
// GPU statistics.
|
||||
auto gpu_statistics = std::make_shared<SwitchComponent>(mWindow);
|
||||
gpu_statistics->setState(Settings::getInstance()->getBool("DrawGPUStatistics"));
|
||||
s->addWithLabel("GPU STATISTICS OVERLAY", gpu_statistics);
|
||||
s->addSaveFunc([gpu_statistics] { Settings::getInstance()->setBool("DrawGPUStatistics",
|
||||
gpu_statistics->setState(Settings::getInstance()->getBool("DisplayGPUStatistics"));
|
||||
s->addWithLabel("DISPLAY GPU STATISTICS OVERLAY", gpu_statistics);
|
||||
s->addSaveFunc([gpu_statistics] { Settings::getInstance()->setBool("DisplayGPUStatistics",
|
||||
gpu_statistics->getState()); });
|
||||
|
||||
// Hide Reboot System option in the quit menu.
|
||||
|
|
|
@ -271,7 +271,7 @@ bool parseArgs(int argc, char* argv[])
|
|||
i++; // Skip vsync value.
|
||||
}
|
||||
else if (strcmp(argv[i], "--gpu-statistics") == 0) {
|
||||
Settings::getInstance()->setBool("DrawGPUStatistics", "true");
|
||||
Settings::getInstance()->setBool("DisplayGPUStatistics", "true");
|
||||
}
|
||||
else if (strcmp(argv[i], "--force-full") == 0) {
|
||||
Settings::getInstance()->setString("UIMode", "full");
|
||||
|
@ -313,7 +313,7 @@ bool parseArgs(int argc, char* argv[])
|
|||
#endif
|
||||
" --vsync [1/on or 0/off] Turn vsync on or off (default is on)\n"
|
||||
" --max-vram [size] Max VRAM to use (in mebibytes) before swapping\n"
|
||||
" --gpu-statistics Draw framerate and VRAM usage overlay\n"
|
||||
" --gpu-statistics Display framerate and VRAM usage overlay\n"
|
||||
" --force-full Force the UI mode to Full\n"
|
||||
" --force-kid Force the UI mode to Kid\n"
|
||||
" --force-kiosk Force the UI mode to Kiosk\n"
|
||||
|
|
|
@ -204,7 +204,7 @@ void Settings::setDefaults()
|
|||
mBoolMap["LocalArt"] = false;
|
||||
mBoolMap["ShowHiddenFiles"] = true;
|
||||
mBoolMap["ShowHiddenGames"] = true;
|
||||
mBoolMap["DrawGPUStatistics"] = false;
|
||||
mBoolMap["DisplayGPUStatistics"] = false;
|
||||
mBoolMap["ShowRebootSystem"] = true;
|
||||
mBoolMap["ShowPoweroffSystem"] = true;
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ void Window::update(int deltaTime)
|
|||
if (mFrameTimeElapsed > 500) {
|
||||
mAverageDeltaTime = mFrameTimeElapsed / mFrameCountElapsed;
|
||||
|
||||
if (Settings::getInstance()->getBool("DrawGPUStatistics")) {
|
||||
if (Settings::getInstance()->getBool("DisplayGPUStatistics")) {
|
||||
std::stringstream ss;
|
||||
|
||||
// FPS.
|
||||
|
@ -216,6 +216,9 @@ void Window::update(int deltaTime)
|
|||
ss << std::fixed << std::setprecision(2) <<
|
||||
((float)mFrameTimeElapsed / (float)mFrameCountElapsed) << " ms)";
|
||||
|
||||
// The following calculations are not accurate, and the font calculation is completely
|
||||
// broken. For now, still report the figures as it's somehow useful to locate memory
|
||||
// leaks and similar. But this needs to be completely overhauled later on.
|
||||
// VRAM.
|
||||
float textureVramUsageMiB = TextureResource::getTotalMemUsage() / 1024.0f / 1024.0f;
|
||||
float textureTotalUsageMiB = TextureResource::getTotalTextureSize() / 1024.0f / 1024.0f;
|
||||
|
@ -263,7 +266,7 @@ void Window::render()
|
|||
if (!mRenderedHelpPrompts)
|
||||
mHelp->render(transform);
|
||||
|
||||
if (Settings::getInstance()->getBool("DrawGPUStatistics") && mFrameDataText) {
|
||||
if (Settings::getInstance()->getBool("DisplayGPUStatistics") && mFrameDataText) {
|
||||
Renderer::setMatrix(Transform4x4f::Identity());
|
||||
mDefaultFonts.at(1)->renderTextCache(mFrameDataText.get());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue