sys: Only display FPS in debug builds
This commit is contained in:
parent
2d5f77730b
commit
95a3104a56
@ -190,15 +190,26 @@ namespace hex {
|
||||
curl_mimepart *part = curl_mime_addpart(mime);
|
||||
|
||||
auto fileName = filePath.filename().string();
|
||||
curl_mime_data_cb(
|
||||
part, file.getSize(), [](char *buffer, size_t size, size_t nitems, void *arg) -> size_t {
|
||||
curl_mime_data_cb(part, file.getSize(),
|
||||
[](char *buffer, size_t size, size_t nitems, void *arg) -> size_t {
|
||||
auto file = static_cast<FILE*>(arg);
|
||||
return fread(buffer, size, nitems, file); }, [](void *arg, curl_off_t offset, int origin) -> int {
|
||||
|
||||
return fread(buffer, size, nitems, file);
|
||||
},
|
||||
[](void *arg, curl_off_t offset, int origin) -> int {
|
||||
auto file = static_cast<FILE*>(arg);
|
||||
fseek(file, offset, origin);
|
||||
return CURL_SEEKFUNC_OK; }, [](void *arg) {
|
||||
|
||||
if (fseek(file, offset, origin) != 0)
|
||||
return CURL_SEEKFUNC_CANTSEEK;
|
||||
else
|
||||
return CURL_SEEKFUNC_OK;
|
||||
},
|
||||
[](void *arg) {
|
||||
auto file = static_cast<FILE*>(arg);
|
||||
fclose(file); }, file.getHandle());
|
||||
|
||||
fclose(file);
|
||||
},
|
||||
file.getHandle());
|
||||
curl_mime_filename(part, fileName.c_str());
|
||||
curl_mime_name(part, "file");
|
||||
|
||||
|
@ -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", "도움말" },
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user