param: frame_timing_detailed

amd_cpu_temp
flightlessmango 5 months ago
parent c5c82dbbae
commit e1f37e67df

@ -161,7 +161,7 @@ static void ImGuiTableSetColumnIndex(int column)
void HudElements::time(){
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_time]){
if (!HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_horizontal] && !HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_hud_compact]){
ImguiNextColumnFirstItem();
ImguiNextColumnFirstItem();
HUDElements.TextColored(HUDElements.colors.text, "Time");
}
ImguiNextColumnFirstItem();
@ -771,6 +771,9 @@ void HudElements::frame_timing(){
min_time = min_frametime;
max_time = max_frametime;
}
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_frame_timing_detailed]){
height = 125;
}
if (ImGui::BeginChild("my_child_window", ImVec2(width, height), false, ImGuiWindowFlags_NoDecoration)) {
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_histogram]){
@ -788,11 +791,16 @@ void HudElements::frame_timing(){
if (ImPlot::BeginPlot("My Plot", ImVec2(width, height), ImPlotFlags_CanvasOnly | ImPlotFlags_NoInputs)) {
ImPlotStyle& style = ImPlot::GetStyle();
style.Colors[ImPlotCol_PlotBg] = ImVec4(0.92f, 0.92f, 0.95f, 0.00f);
ImPlotAxisFlags ax_flags = ImPlotAxisFlags_NoDecorations;
ImPlot::SetupAxes(nullptr, nullptr, ax_flags,ax_flags);
style.Colors[ImPlotCol_AxisGrid] = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
style.Colors[ImPlotCol_AxisTick] = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
ImPlotAxisFlags ax_flags_x = ImPlotAxisFlags_NoDecorations;
ImPlotAxisFlags ax_flags_y = ImPlotAxisFlags_NoDecorations;
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_frame_timing_detailed])
ax_flags_y = ImPlotAxisFlags_Opposite | ImPlotAxisFlags_NoMenus;
ImPlot::SetupAxes(nullptr, nullptr, ax_flags_x, ax_flags_y);
ImPlot::SetupAxisScale(ImAxis_Y1, TransformForward_Custom, TransformInverse_Custom);
ImPlot::SetupAxesLimits(0, 200, min_time, max_time);
ImPlot::PushStyleVar(ImPlotStyleVar_PlotPadding, ImVec2(0,0));
ImPlot::SetNextLineStyle(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), 1.5);
ImPlot::PlotLine("frametime line", frametime_data.data(), frametime_data.size());
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_throttling_status_graph] && throttling){

@ -669,6 +669,7 @@ static void set_param_defaults(struct overlay_params *params){
params->enabled[OVERLAY_PARAM_ENABLED_dynamic_frame_timing] = false;
params->enabled[OVERLAY_PARAM_ENABLED_temp_fahrenheit] = false;
params->enabled[OVERLAY_PARAM_ENABLED_duration] = false;
params->enabled[OVERLAY_PARAM_ENABLED_frame_timing_detailed] = false;
params->fps_sampling_period = 500000000; /* 500ms */
params->width = 0;
params->height = 140;
@ -1113,6 +1114,7 @@ void presets(int preset, struct overlay_params *params, bool inherit) {
add_to_options(params, "media_player", "0");
add_to_options(params, "debug", "1");
add_to_options(params, "version", "0");
add_to_options(params, "frame_timing_detailed", "1");
break;
}

@ -108,6 +108,7 @@ typedef unsigned long KeySym;
OVERLAY_PARAM_BOOL(inherit) \
OVERLAY_PARAM_BOOL(hdr) \
OVERLAY_PARAM_BOOL(refresh_rate) \
OVERLAY_PARAM_BOOL(frame_timing_detailed) \
OVERLAY_PARAM_CUSTOM(fps_sampling_period) \
OVERLAY_PARAM_CUSTOM(output_folder) \
OVERLAY_PARAM_CUSTOM(output_file) \

Loading…
Cancel
Save