adjust benchHeight for 0.1% and fix percentages.

pull/232/head
Kingsley McDonald 4 years ago
parent 053a1d8a44
commit 6178c5859c

@ -785,12 +785,12 @@ void calculate_benchmark_data(){
benchmark.avg = benchmark.total / sorted.size();
// 1% min
benchmark.total = 0.f;
for (size_t i = 0; i < sorted.size() * 0.1; i++){
for (size_t i = 0; i < sorted.size() * 0.01; i++){
benchmark.total = sorted[i];
}
benchmark.oneP = benchmark.total;
// 0.1% min
benchmark.pointOneP = sorted[sorted.size() * 0.01];
benchmark.pointOneP = sorted[sorted.size() * 0.001];
}
void update_hud_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID){
@ -1017,7 +1017,7 @@ void render_mpris_metadata(swapchain_stats& data, const ImVec4& color, metadata&
void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, unsigned height, uint64_t now){
// TODO, FIX LOG_DURATION FOR BENCHMARK
int benchHeight = 5 * params.font_size + 10.0f + 58;
int benchHeight = 6 * params.font_size + 10.0f + 58;
ImGui::SetNextWindowSize(ImVec2(window_size.x, benchHeight), ImGuiCond_Always);
if (height - (window_size.y + data.main_window_pos.y + 5) < benchHeight)
ImGui::SetNextWindowPos(ImVec2(data.main_window_pos.x, data.main_window_pos.y - benchHeight - 5), ImGuiCond_Always);

Loading…
Cancel
Save