mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
ui: Moved FPS counter to footer
This commit is contained in:
21
plugins/builtin/source/content/footer_items.cpp
Normal file
21
plugins/builtin/source/content/footer_items.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <hex/plugin.hpp>
|
||||
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
void addFooterItems() {
|
||||
|
||||
ContentRegistry::Interface::addFooterItem([] {
|
||||
static float framerate = 0;
|
||||
if (ImGui::HasSecondPassed()) {
|
||||
framerate = ImGui::GetIO().Framerate;
|
||||
}
|
||||
|
||||
ImGui::TextUnformatted(hex::format("FPS {0:.2f}", framerate).c_str());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user