mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 04:42:18 -05:00
Rumble and check tracker fixes (#2419)
* Fix rumble * Fix check tracker crash
This commit is contained in:
parent
544460d909
commit
44f963e310
@ -115,9 +115,10 @@ void DrawCheckTracker(bool& open) {
|
|||||||
|
|
||||||
ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver);
|
||||||
|
|
||||||
if (doInitialize)
|
if (doInitialize) {
|
||||||
|
Teardown();
|
||||||
InitializeChecks();
|
InitializeChecks();
|
||||||
else if (initialized && (gPlayState == nullptr || gSaveContext.fileNum < 0 || gSaveContext.fileNum > 2)) {
|
} else if (initialized && (gPlayState == nullptr || gSaveContext.fileNum < 0 || gSaveContext.fileNum > 2)) {
|
||||||
Teardown();
|
Teardown();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,12 @@
|
|||||||
UnkRumbleStruct D_80160FD0;
|
UnkRumbleStruct D_80160FD0;
|
||||||
|
|
||||||
void func_800A9F30(PadMgr* a, s32 b) {
|
void func_800A9F30(PadMgr* a, s32 b) {
|
||||||
func_800D2E30(&D_80160FD0);
|
// TODO: Workaround for rumble being too long. Implement os thread functions.
|
||||||
PadMgr_RumbleSet(a, D_80160FD0.rumbleEnable);
|
// 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) {
|
void func_800A9F6C(f32 a, u8 b, u8 c, u8 d) {
|
||||||
|
@ -357,20 +357,16 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
|
|||||||
}
|
}
|
||||||
padMgr->validCtrlrsMask = mask;
|
padMgr->validCtrlrsMask = mask;
|
||||||
|
|
||||||
// TODO: Workaround for rumble being too long. Implement os thread functions.
|
/* if (gFaultStruct.msgId) {
|
||||||
// Game logic runs at 20hz but input thread runs at 60 hertz, so we call this 3 times
|
PadMgr_RumbleStop(padMgr);
|
||||||
for (i = 0; i < 3; i++) {
|
} else */ if (padMgr->rumbleOffFrames > 0) {
|
||||||
/* if (gFaultStruct.msgId) {
|
--padMgr->rumbleOffFrames;
|
||||||
PadMgr_RumbleStop(padMgr);
|
PadMgr_RumbleStop(padMgr);
|
||||||
} else */ if (padMgr->rumbleOffFrames > 0) {
|
} else if (padMgr->rumbleOnFrames == 0) {
|
||||||
--padMgr->rumbleOffFrames;
|
PadMgr_RumbleStop(padMgr);
|
||||||
PadMgr_RumbleStop(padMgr);
|
} else if (!padMgr->preNMIShutdown) {
|
||||||
} else if (padMgr->rumbleOnFrames == 0) {
|
PadMgr_RumbleControl(padMgr);
|
||||||
PadMgr_RumbleStop(padMgr);
|
--padMgr->rumbleOnFrames;
|
||||||
} else if (!padMgr->preNMIShutdown) {
|
|
||||||
PadMgr_RumbleControl(padMgr);
|
|
||||||
--padMgr->rumbleOnFrames;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user