mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
Merge pull request #1910 from TheAggie/fix/pad-vibration-mode-compatible
fix(pad): accept the compatible vibration mode
This commit is contained in:
@@ -240,7 +240,7 @@ int APS5_VABI scePadSetVibration(int handle, const PadVibrationParam* param) {
|
||||
|
||||
int APS5_VABI scePadSetVibrationMode(int handle, int mode) {
|
||||
if (handle != PAD_HANDLE) return PAD_ERROR_INVALID_HANDLE;
|
||||
if (mode != 0 && mode != 1) return PAD_ERROR_INVALID_ARG;
|
||||
if (mode < 0 || mode > 2) return PAD_ERROR_INVALID_ARG;
|
||||
Pad::SetVibrationMode(mode);
|
||||
return PAD_OK;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ int APS5_VABI scePadOpenExt(int, int, int, const void*);
|
||||
int APS5_VABI scePadClose_nid_postfix(int);
|
||||
int APS5_VABI scePadGetHandle(int, int, int);
|
||||
int APS5_VABI scePadSetVibrationTriggerEffectWeakWhileEmbeddedMicInUse(bool);
|
||||
int APS5_VABI scePadSetVibrationMode(int, int);
|
||||
int APS5_VABI scePadInit_nid_postfix(void);
|
||||
int APS5_VABI scePadRead_nid_postfix(int, PadData*, int);
|
||||
int APS5_VABI scePadReadState(int, PadData*);
|
||||
@@ -99,6 +100,10 @@ int main() {
|
||||
CheckTouchContact();
|
||||
CheckReadStateHandle(handle);
|
||||
CheckRemoteController(handle);
|
||||
Require(scePadSetVibrationMode(handle, 1) == 0);
|
||||
Require(scePadSetVibrationMode(handle, 2) == 0);
|
||||
Require(scePadSetVibrationMode(handle, 3) == PAD_ERROR_INVALID_ARG);
|
||||
Require(scePadSetVibrationMode(handle, -1) == PAD_ERROR_INVALID_ARG);
|
||||
Require(scePadGetHandle(0xff, 16, 0) == handle);
|
||||
Require(scePadGetHandle(user, 16, 0) == noHandle);
|
||||
Require(scePadGetHandle(user, 0, 1) == noHandle);
|
||||
|
||||
Reference in New Issue
Block a user