diff --git a/es-app/src/emulationstation.6.gz b/es-app/src/emulationstation.6.gz index df4045bf6..1ef348f52 100644 Binary files a/es-app/src/emulationstation.6.gz and b/es-app/src/emulationstation.6.gz differ diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 80fc5669a..8d7f1afb7 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -678,9 +678,9 @@ void GuiMenu::openOtherSettings() // GPU statistics. auto gpu_statistics = std::make_shared(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. diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index 042759026..7a12e5a28 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -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" diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 7fbf2d3e5..12800c293 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -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; diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index e9a895105..84ec5a624 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -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()); }