fix controller vibration (#1685)

* fix vibration being wrong and untoggleable

* fix a battle hud crash
This commit is contained in:
ManDude
2022-07-20 00:06:05 +01:00
committed by GitHub
parent a8653f7595
commit 5d4ba62bdb
5 changed files with 18 additions and 10 deletions
+5 -5
View File
@@ -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;