permit starting a new log even if previous is rendering

gpu_metrics
FlightlessMango 2 years ago
parent 9c7f91eccd
commit 46730b572a

@ -23,12 +23,11 @@ static void parse_command(struct instance_data *instance_data,
}
if (!strncmp(cmd, "logging", cmdlen)) {
auto now = Clock::now(); /* us */
if (now - logger->last_log_end() > 11s){
if (logger->is_active())
logger->stop_logging();
else
logger->start_logging();
}
if (logger->is_active())
logger->stop_logging();
else
logger->start_logging();
}
}

@ -26,7 +26,7 @@ void check_keybinds(struct swapchain_stats& sw_stats, struct overlay_params& par
#else
pressed = false;
#endif
if (pressed && (now - logger->last_log_end() > 11s)) {
if (pressed) {
last_f2_press = now;
if (logger->is_active()) {
logger->stop_logging();

@ -496,7 +496,7 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2&
ImGui::GetWindowDrawList()->AddCircleFilled(ImVec2(data.main_window_pos.x + window_size.x - 15, data.main_window_pos.y + 15), 10, params.engine_color, 20);
window_size = ImVec2(window_size.x, ImGui::GetCursorPosY() + 10.0f);
ImGui::End();
if((now - logger->last_log_end()) < 12s)
if((now - logger->last_log_end()) < 12s && !logger->is_active())
render_benchmark(data, params, window_size, height, now);
}
}

Loading…
Cancel
Save