Rumble and check tracker fixes (#2419)

* Fix rumble

* Fix check tracker crash
This commit is contained in:
Sirius902 2023-01-30 09:33:52 -08:00 committed by GitHub
parent 544460d909
commit 44f963e310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 18 deletions

View File

@ -115,9 +115,10 @@ void DrawCheckTracker(bool& open) {
ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver);
if (doInitialize)
if (doInitialize) {
Teardown();
InitializeChecks();
else if (initialized && (gPlayState == nullptr || gSaveContext.fileNum < 0 || gSaveContext.fileNum > 2)) {
} else if (initialized && (gPlayState == nullptr || gSaveContext.fileNum < 0 || gSaveContext.fileNum > 2)) {
Teardown();
return;
}

View File

@ -3,9 +3,13 @@
UnkRumbleStruct D_80160FD0;
void func_800A9F30(PadMgr* a, s32 b) {
// 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) {
s32 temp1;

View File

@ -357,9 +357,6 @@ 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) {
@ -372,7 +369,6 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
--padMgr->rumbleOnFrames;
}
}
}
void PadMgr_HandlePreNMI(PadMgr* padMgr) {
osSyncPrintf("padmgr_HandlePreNMI()\n");