mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 13:53:01 -04:00
fix controller vibration (#1685)
* fix vibration being wrong and untoggleable * fix a battle hud crash
This commit is contained in:
@@ -113,8 +113,8 @@ u64 CPadGetData(u64 cpad_info) {
|
||||
// ps2 controllers would send an enabled bit if the button was NOT pressed, but we don't do
|
||||
// that here. removed code that flipped the bits.
|
||||
|
||||
if (cpad->buzz_act) {
|
||||
scePadSetActDirect(cpad->number, 0, cpad);
|
||||
if (cpad->change_time) {
|
||||
scePadSetActDirect(cpad->number, 0, cpad->direct);
|
||||
}
|
||||
cpad->valid = pad_state;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ u64 CPadGetData(u64 cpad_info) {
|
||||
break;
|
||||
case 40: // controller mode - check for extra modes
|
||||
// cpad->change_time = 0;
|
||||
cpad->buzz_act = 0;
|
||||
cpad->change_time = 0;
|
||||
if (scePadInfoMode(cpad->number, 0, InfoModeIdTable, -1) == 0) {
|
||||
// no controller modes
|
||||
cpad->state = 90;
|
||||
@@ -171,12 +171,12 @@ u64 CPadGetData(u64 cpad_info) {
|
||||
if (scePadInfoAct(cpad->number, 0, -1, 0) < 1) {
|
||||
// no actuators means no vibration. skip to end!
|
||||
// cpad->change_time = 0;
|
||||
cpad->buzz_act = 0;
|
||||
cpad->change_time = 0;
|
||||
cpad->state = 99;
|
||||
} else {
|
||||
// we have actuators to use.
|
||||
// cpad->change_time = 1; // remember to update pad times.
|
||||
cpad->buzz_act = 1;
|
||||
cpad->change_time = 1;
|
||||
cpad->state = 75;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user