OSD: Fix invisible inputs

OSD: Show all button inputs and their pressure when available
This commit is contained in:
Toastarrr 2023-01-18 05:54:23 -05:00 committed by refractionpcsx2
parent 64a8e66bac
commit 20de162a55
1 changed files with 3 additions and 1 deletions

View File

@ -530,8 +530,10 @@ void ImGuiManager::DrawInputsOverlay()
{ {
// buttons only shown when active // buttons only shown when active
const float value = static_cast<float>(g_key_status.GetRawPressure(port, bind)) * (1.0f / 255.0f); const float value = static_cast<float>(g_key_status.GetRawPressure(port, bind)) * (1.0f / 255.0f);
if (value >= 0.5f) if (value == 1.0f)
fmt::format_to(std::back_inserter(text), " {}", bi.name); fmt::format_to(std::back_inserter(text), " {}", bi.name);
else if (value > 0.0f)
fmt::format_to(std::back_inserter(text), " {}: {:.2f}", bi.name, value);
} }
break; break;