summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorSirius902 <10891979+Sirius902@users.noreply.github.com>2023-01-30 09:33:52 -0800
committerGitHub <noreply@github.com>2023-01-30 12:33:52 -0500
commit44f963e310360c83e165ddef55080ad352b3c3dc (patch)
tree665f8044d92b90c41248723748f6c1b1fc82a3cc /soh/src/code
parent544460d90941fb1d845abe8d5158423a52880ba3 (diff)
Rumble and check tracker fixes (#2419)
* Fix rumble * Fix check tracker crash
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/code_800A9F30.c8
-rw-r--r--soh/src/code/padmgr.c24
2 files changed, 16 insertions, 16 deletions
diff --git a/soh/src/code/code_800A9F30.c b/soh/src/code/code_800A9F30.c
index 6ba9c9783..3462da729 100644
--- a/soh/src/code/code_800A9F30.c
+++ b/soh/src/code/code_800A9F30.c
@@ -3,8 +3,12 @@
UnkRumbleStruct D_80160FD0;
void func_800A9F30(PadMgr* a, s32 b) {
- func_800D2E30(&D_80160FD0);
- PadMgr_RumbleSet(a, D_80160FD0.rumbleEnable);
+ // TODO: Workaround for rumble being too long. Implement os thread functions.
+ // Game logic runs at 20hz but input thread runs at 60 hertz, so we call this 3 times
+ for (int i = 0; i < 3; i++) {
+ func_800D2E30(&D_80160FD0);
+ PadMgr_RumbleSet(a, D_80160FD0.rumbleEnable);
+ }
}
void func_800A9F6C(f32 a, u8 b, u8 c, u8 d) {
diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c
index cb56cb806..6521ff3aa 100644
--- a/soh/src/code/padmgr.c
+++ b/soh/src/code/padmgr.c
@@ -357,20 +357,16 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
}
padMgr->validCtrlrsMask = mask;
- // TODO: Workaround for rumble being too long. Implement os thread functions.
- // Game logic runs at 20hz but input thread runs at 60 hertz, so we call this 3 times
- for (i = 0; i < 3; i++) {
- /* if (gFaultStruct.msgId) {
- PadMgr_RumbleStop(padMgr);
- } else */ if (padMgr->rumbleOffFrames > 0) {
- --padMgr->rumbleOffFrames;
- PadMgr_RumbleStop(padMgr);
- } else if (padMgr->rumbleOnFrames == 0) {
- PadMgr_RumbleStop(padMgr);
- } else if (!padMgr->preNMIShutdown) {
- PadMgr_RumbleControl(padMgr);
- --padMgr->rumbleOnFrames;
- }
+ /* if (gFaultStruct.msgId) {
+ PadMgr_RumbleStop(padMgr);
+ } else */ if (padMgr->rumbleOffFrames > 0) {
+ --padMgr->rumbleOffFrames;
+ PadMgr_RumbleStop(padMgr);
+ } else if (padMgr->rumbleOnFrames == 0) {
+ PadMgr_RumbleStop(padMgr);
+ } else if (!padMgr->preNMIShutdown) {
+ PadMgr_RumbleControl(padMgr);
+ --padMgr->rumbleOnFrames;
}
}