diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index a0fe66a2e..d63aee918 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1757,12 +1757,13 @@ extern "C" void AudioPlayer_Play(const uint8_t* buf, uint32_t len) { } } -extern "C" int Controller_ShouldRumble(size_t i) { +extern "C" int Controller_ShouldRumble(size_t slot) { auto controlDeck = Ship::Window::GetInstance()->GetControlDeck(); - - for (int i = 0; i < controlDeck->GetNumVirtualDevices(); ++i) { - auto physicalDevice = controlDeck->GetPhysicalDeviceFromVirtualSlot(i); - if (physicalDevice->CanRumble()) { + + if (slot < controlDeck->GetNumVirtualDevices()) { + auto physicalDevice = controlDeck->GetPhysicalDeviceFromVirtualSlot(slot); + + if (physicalDevice->getProfile(slot)->UseRumble && physicalDevice->CanRumble()) { return 1; } } diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 51744dfb4..e8f068429 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -104,7 +104,7 @@ int AudioPlayer_Buffered(void); int AudioPlayer_GetDesiredBuffered(void); void AudioPlayer_Play(const uint8_t* buf, uint32_t len); void AudioMgr_CreateNextAudioBuffer(s16* samples, u32 num_samples); -int Controller_ShouldRumble(size_t i); +int Controller_ShouldRumble(size_t slot); void Controller_BlockGameInput(); void Controller_UnblockGameInput(); void Hooks_ExecuteAudioInit(); diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c index ed18dcbac..48752fed1 100644 --- a/soh/src/code/padmgr.c +++ b/soh/src/code/padmgr.c @@ -331,7 +331,7 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) { osContGetReadData(padMgr->pads); for (i = 0; i < __osMaxControllers; i++) { - padMgr->padStatus[i].status = CVar_GetS32("gRumbleEnabled", 0) && Controller_ShouldRumble(i); + padMgr->padStatus[i].status = Controller_ShouldRumble(i); } if (padMgr->preNMIShutdown) {