From c1231885fe515f13791ae32f33e48471f9991a31 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 25 Apr 2026 22:17:17 -0700 Subject: [PATCH 1/2] Add rumble intensity sliders to input configurator (#558) --- src/dusk/imgui/ImGuiMenuGame.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/dusk/imgui/ImGuiMenuGame.cpp b/src/dusk/imgui/ImGuiMenuGame.cpp index 0a687233aa..42dfc8af65 100644 --- a/src/dusk/imgui/ImGuiMenuGame.cpp +++ b/src/dusk/imgui/ImGuiMenuGame.cpp @@ -965,7 +965,7 @@ namespace dusk { ImGui::SameLine(); // Options panel - ImGuiBeginGroupPanel("Options", ImVec2(150 * scale, 20 * scale)); + ImGuiBeginGroupPanel("Options", ImVec2(150 * scale, -1)); if (deadZones != nullptr) { if (ImGui::Checkbox("Enable Dead Zones", &deadZones->useDeadzones)) { @@ -975,7 +975,24 @@ namespace dusk { PADSerializeMappings(); } } - + + if (PADSupportsRumbleIntensity(m_controllerConfig.m_selectedPort)) { + ImGuiBeginGroupPanel("Rumble Intensity", ImVec2(150 * scale, -1)); + u16 low; + u16 high; + (void)PADGetRumbleIntensity(m_controllerConfig.m_selectedPort, &low, &high); + float fLow = static_cast(low / 32767) * 100.f; + bool changed = ImGui::SliderFloat("Low", &fLow, 0.f, 100.f, "%.0f%%"); + float fHigh = static_cast(high / 32767) * 100.f; + changed |= ImGui::SliderFloat("High", &fHigh, 0.f, 100.f, "%.0f%%"); + if (changed) { + PADSetRumbleIntensity(m_controllerConfig.m_selectedPort, + static_cast((fLow / 100.f) * 32767), + static_cast((fHigh / 100.f) * 32767)); + PADSerializeMappings(); + } + ImGuiEndGroupPanel(); + } ImGuiEndGroupPanel(); ImGui::End(); From 8784958c40d8205df876d2ef5dd2b3b837d328f5 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 25 Apr 2026 22:51:39 -0700 Subject: [PATCH 2/2] Quick PAD rumble fixes, add button to test rumble configuration --- extern/aurora | 2 +- src/dusk/imgui/ImGuiMenuGame.cpp | 12 ++++++++---- src/dusk/imgui/ImGuiMenuGame.hpp | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/extern/aurora b/extern/aurora index 135e976867..8af9057689 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit 135e976867490380356878c8bb8d1956932489c5 +Subproject commit 8af9057689b9b85a55bbbd6218bc95304558fabd diff --git a/src/dusk/imgui/ImGuiMenuGame.cpp b/src/dusk/imgui/ImGuiMenuGame.cpp index 42dfc8af65..dcfcc55657 100644 --- a/src/dusk/imgui/ImGuiMenuGame.cpp +++ b/src/dusk/imgui/ImGuiMenuGame.cpp @@ -981,16 +981,20 @@ namespace dusk { u16 low; u16 high; (void)PADGetRumbleIntensity(m_controllerConfig.m_selectedPort, &low, &high); - float fLow = static_cast(low / 32767) * 100.f; + float fLow = (static_cast(low) / 32767.f) * 100.f; bool changed = ImGui::SliderFloat("Low", &fLow, 0.f, 100.f, "%.0f%%"); - float fHigh = static_cast(high / 32767) * 100.f; + float fHigh = (static_cast(high) / 32767.f) * 100.f; changed |= ImGui::SliderFloat("High", &fHigh, 0.f, 100.f, "%.0f%%"); if (changed) { PADSetRumbleIntensity(m_controllerConfig.m_selectedPort, - static_cast((fLow / 100.f) * 32767), - static_cast((fHigh / 100.f) * 32767)); + static_cast((fLow / 100) * 32767), + static_cast((fHigh / 100) * 32767)); PADSerializeMappings(); } + if (ImGui::Button(fmt::format("{0}...##rumbleTest", m_controllerConfig.m_isRumbling ? "Stop": "Test").c_str(), {-1, 0})) { + PADControlMotor(m_controllerConfig.m_selectedPort, !m_controllerConfig.m_isRumbling ? PAD_MOTOR_RUMBLE : PAD_MOTOR_STOP_HARD); + m_controllerConfig.m_isRumbling ^= 1; + } ImGuiEndGroupPanel(); } ImGuiEndGroupPanel(); diff --git a/src/dusk/imgui/ImGuiMenuGame.hpp b/src/dusk/imgui/ImGuiMenuGame.hpp index e21374c8f4..fb3f3f10ca 100644 --- a/src/dusk/imgui/ImGuiMenuGame.hpp +++ b/src/dusk/imgui/ImGuiMenuGame.hpp @@ -32,6 +32,7 @@ namespace dusk { PADButtonMapping* m_pendingButtonMapping = nullptr; PADAxisMapping* m_pendingAxisMapping = nullptr; int m_pendingPort = -1; + bool m_isRumbling = false; } m_controllerConfig; bool m_showControllerConfig = false;