mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
sys: Only display FPS in debug builds
This commit is contained in:
@@ -212,14 +212,16 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
}
|
||||
|
||||
ContentRegistry::Interface::addFooterItem([] {
|
||||
static float framerate = 0;
|
||||
if (ImGui::HasSecondPassed()) {
|
||||
framerate = 1.0F / ImGui::GetIO().DeltaTime;
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
ContentRegistry::Interface::addFooterItem([] {
|
||||
static float framerate = 0;
|
||||
if (ImGui::HasSecondPassed()) {
|
||||
framerate = 1.0F / ImGui::GetIO().DeltaTime;
|
||||
}
|
||||
|
||||
ImGui::TextFormatted("FPS {0:2}.{1:02}", u32(framerate), u32(framerate * 100) % 100);
|
||||
});
|
||||
ImGui::TextFormatted("FPS {0:2}.{1:02}", u32(framerate), u32(framerate * 100) % 100);
|
||||
});
|
||||
#endif
|
||||
|
||||
ContentRegistry::Interface::addFooterItem([] {
|
||||
auto taskCount = TaskManager::getRunningTaskCount();
|
||||
|
||||
@@ -133,7 +133,6 @@ namespace hex::plugin::builtin {
|
||||
|
||||
{ "hex.builtin.menu.view", "Ansicht" },
|
||||
{ "hex.builtin.menu.layout", "Layout" },
|
||||
{ "hex.builtin.menu.view.fps", "FPS anzeigen" },
|
||||
{ "hex.builtin.menu.view.demo", "ImGui Demo anzeigen" },
|
||||
{ "hex.builtin.menu.help", "Hilfe" },
|
||||
|
||||
|
||||
@@ -136,7 +136,6 @@ namespace hex::plugin::builtin {
|
||||
|
||||
{ "hex.builtin.menu.view", "뷰" },
|
||||
{ "hex.builtin.menu.layout", "레이아웃" },
|
||||
{ "hex.builtin.menu.view.fps", "FPS 표시하기" },
|
||||
{ "hex.builtin.menu.view.demo", "ImGui Demo 표시하기" },
|
||||
{ "hex.builtin.menu.help", "도움말" },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user