diff --git a/src/overlay.cpp b/src/overlay.cpp index 4563ed66..9e7775e7 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -1130,6 +1130,14 @@ static void compute_swapchain_display(struct swapchain_data *data) } if (!instance_data->params.no_display){ + if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_time]){ + std::time_t t = std::time(nullptr); + std::stringstream time; + time << std::put_time(std::localtime(&t), "%T"); + ImGui::PushFont(font1); + ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.00f), "%s", time.str().c_str()); + ImGui::PopFont(); + } if (device_data->gpu_stats && instance_data->params.enabled[OVERLAY_PARAM_ENABLED_gpu_stats]){ ImGui::TextColored(ImVec4(0.180, 0.592, 0.384, 1.00f), "GPU"); ImGui::SameLine(hudFirstRow); diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 5e7e72e6..ec43bc32 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -335,6 +335,9 @@ parse_overlay_env(struct overlay_params *params, if (params->enabled[OVERLAY_PARAM_ENABLED_vram]) params->height += (params->font_size - 3); + + if (params->enabled[OVERLAY_PARAM_ENABLED_time]) + params->height += ((params->font_size / 2) - (3 / 2)); } } \ No newline at end of file diff --git a/src/overlay_params.h b/src/overlay_params.h index 3ead937d..6855a988 100644 --- a/src/overlay_params.h +++ b/src/overlay_params.h @@ -47,6 +47,7 @@ extern "C" { OVERLAY_PARAM_BOOL(ram) \ OVERLAY_PARAM_BOOL(vram) \ OVERLAY_PARAM_BOOL(crosshair) \ + OVERLAY_PARAM_BOOL(time) \ OVERLAY_PARAM_BOOL(full) \ OVERLAY_PARAM_CUSTOM(fps_sampling_period) \ OVERLAY_PARAM_CUSTOM(output_file) \