Fixed bench position even more

pull/197/head
FlightlessMango 4 years ago
parent 7f9bb2e6b8
commit 434aa04356

@ -1178,10 +1178,10 @@ 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
cout << height - ( 5 * params.font_size + 10.0f + 58) << endl;
ImGui::SetNextWindowSize(ImVec2(window_size.x, 5 * params.font_size + 10.0f + 58), ImGuiCond_Always);
if (height - (window_size.y + data.main_window_pos.y + 5) < 0)
ImGui::SetNextWindowPos(ImVec2(data.main_window_pos.x, data.main_window_pos.y - (5 * params.font_size) - 73), ImGuiCond_Always);
int benchHeight = 5 * 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);
else
ImGui::SetNextWindowPos(ImVec2(data.main_window_pos.x, data.main_window_pos.y + window_size.y + 5), ImGuiCond_Always);

Loading…
Cancel
Save