mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 03:12:18 -05:00
fix: make fisherman rumble text work (#2279)
we weren't correctly setting the pakType in padMgr because the depreciated `gRumbleEnabled` cvar was being checked
This commit is contained in:
parent
85bccab1bb
commit
f42f86e3ef
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user