1
0
mirror of synced 2024-11-24 15:50:16 +01:00

Properly right align FPS display

This commit is contained in:
WerWolv 2020-11-11 11:56:37 +01:00
parent 3dfff3c754
commit c6ef30e764

View File

@ -71,8 +71,11 @@ namespace hex {
}
if (this->m_fpsVisible) {
ImGui::SameLine(ImGui::GetWindowWidth() - 80);
ImGui::Text("%.1f FPS", ImGui::GetIO().Framerate);
char buffer[0x20];
snprintf(buffer, 0x20, "%.1f FPS", ImGui::GetIO().Framerate);
ImGui::SameLine(ImGui::GetWindowWidth() - ImGui::GetFontSize() * strlen(buffer) + 20);
ImGui::TextUnformatted(buffer);
}