add ram/vram param options

pull/20/head
FlightlessMango 4 years ago committed by jackun
parent beaac191d1
commit 35d8f7c829
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -1174,12 +1174,24 @@ static void compute_swapchain_display(struct swapchain_data *data)
i++;
}
}
ImGui::TextColored(ImVec4(0.678, 0.392, 0.756, 1.00f), "VRAM");
ImGui::SameLine(hudFirstRow);
ImGui::Text("%iMB", gpuMemUsed);
ImGui::TextColored(ImVec4(0.760, 0.4, 0.576, 1.00f), "RAM");
ImGui::SameLine(hudFirstRow);
ImGui::Text("%.1fG", memused);
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_vram]){
ImGui::TextColored(ImVec4(0.678, 0.392, 0.756, 1.00f), "VRAM");
ImGui::SameLine(hudFirstRow);
ImGui::Text("%i", gpuMemUsed);
ImGui::SameLine(0,1.0f);
ImGui::PushFont(font1);
ImGui::Text("MB");
ImGui::PopFont();
}
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_ram]){
ImGui::TextColored(ImVec4(0.760, 0.4, 0.576, 1.00f), "RAM");
ImGui::SameLine(hudFirstRow);
ImGui::Text("%.1f", memused);
ImGui::SameLine(0,1.0f);
ImGui::PushFont(font1);
ImGui::Text("GB");
ImGui::PopFont();
}
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_fps]){
ImGui::TextColored(ImVec4(0.925, 0.411, 0.411, 1.00f), "%s", engineName.c_str());
ImGui::SameLine(hudFirstRow);

@ -177,6 +177,8 @@ parse_overlay_env(struct overlay_params *params,
params->enabled[OVERLAY_PARAM_ENABLED_gpu_temp] = false;
params->enabled[OVERLAY_PARAM_ENABLED_cpu_stats] = true;
params->enabled[OVERLAY_PARAM_ENABLED_gpu_stats] = true;
params->enabled[OVERLAY_PARAM_ENABLED_ram] = false;
params->enabled[OVERLAY_PARAM_ENABLED_vram] = false;
params->fps_sampling_period = 500000; /* 500ms */
params->width = 280;
params->height = 140;
@ -230,4 +232,10 @@ parse_overlay_env(struct overlay_params *params,
if (params->enabled[OVERLAY_PARAM_ENABLED_cpu_stats])
params->height += (params->font_size - 3);
if (params->enabled[OVERLAY_PARAM_ENABLED_ram])
params->height += (params->font_size - 3);
if (params->enabled[OVERLAY_PARAM_ENABLED_vram])
params->height += (params->font_size - 3);
}

@ -41,8 +41,10 @@ extern "C" {
OVERLAY_PARAM_BOOL(core_load) \
OVERLAY_PARAM_BOOL(cpu_temp) \
OVERLAY_PARAM_BOOL(gpu_temp) \
OVERLAY_PARAM_BOOL(cpu_stats) \
OVERLAY_PARAM_BOOL(gpu_stats) \
OVERLAY_PARAM_BOOL(cpu_stats) \
OVERLAY_PARAM_BOOL(gpu_stats) \
OVERLAY_PARAM_BOOL(ram) \
OVERLAY_PARAM_BOOL(vram) \
OVERLAY_PARAM_CUSTOM(fps_sampling_period) \
OVERLAY_PARAM_CUSTOM(output_file) \
OVERLAY_PARAM_CUSTOM(position) \

Loading…
Cancel
Save