Skip to content

Commit 2674cf3

Browse files
committed
hud_elements: now intel cards can display fan speed too
stop being so mean to intel, they can now display fan speeds too since 6.12 kernel.
1 parent 5f8ee8a commit 2674cf3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/hud_elements.cpp

+12-14
Original file line numberDiff line numberDiff line change
@@ -250,22 +250,20 @@ void HudElements::gpu_stats(){
250250
ImGui::PopFont();
251251
}
252252

253-
if (HUDElements.vendorID == 0x1002 || HUDElements.vendorID == 0x10de){
254-
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_gpu_fan] && cpuStats.cpu_type != "APU"){
255-
ImguiNextColumnOrNewRow();
256-
right_aligned_text(text_color, HUDElements.ralign_width, "%i", gpu->metrics.fan_speed);
253+
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_gpu_fan] && cpuStats.cpu_type != "APU"){
254+
ImguiNextColumnOrNewRow();
255+
right_aligned_text(text_color, HUDElements.ralign_width, "%i", gpu->metrics.fan_speed);
256+
ImGui::SameLine(0, 1.0f);
257+
if (gpu->metrics.fan_rpm) {
258+
ImGui::PushFont(HUDElements.sw_stats->font1);
259+
HUDElements.TextColored(HUDElements.colors.text, "RPM");
260+
} else {
261+
HUDElements.TextColored(HUDElements.colors.text, "%%");
262+
ImGui::PushFont(HUDElements.sw_stats->font1);
257263
ImGui::SameLine(0, 1.0f);
258-
if (gpu->metrics.fan_rpm) {
259-
ImGui::PushFont(HUDElements.sw_stats->font1);
260-
HUDElements.TextColored(HUDElements.colors.text, "RPM");
261-
} else {
262-
HUDElements.TextColored(HUDElements.colors.text, "%%");
263-
ImGui::PushFont(HUDElements.sw_stats->font1);
264-
ImGui::SameLine(0, 1.0f);
265-
HUDElements.TextColored(HUDElements.colors.text, "FAN");
266-
}
267-
ImGui::PopFont();
264+
HUDElements.TextColored(HUDElements.colors.text, "FAN");
268265
}
266+
ImGui::PopFont();
269267
}
270268

271269
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_gpu_core_clock]){

0 commit comments

Comments
 (0)