fix(pad): check the handle and keep the dead band throwing when enabled
Per review: scePadSetAngularVelocityDeadbandState now returns PAD_ERROR_INVALID_HANDLE for a handle other than PAD_HANDLE, like the neighbouring setters. Enabling the dead band still throws, because the angular-velocity reading path does not apply the filter (that would change input, not UI, so it is not a silent stub); disabling it succeeds, which matches the unfiltered readings. The test checks the disabled call, the bad handle, and no longer asserts the enabled path.
This commit is contained in:
parent
1cd34c232d
commit
e4bc4a4ecb
|
|
@ -171,9 +171,9 @@ int APS5_VABI scePadResetOrientation(int handle) {
|
|||
}
|
||||
|
||||
int APS5_VABI scePadSetAngularVelocityDeadbandState(int handle, bool enable) {
|
||||
(void)handle;
|
||||
(void)enable;
|
||||
return 0;
|
||||
if (handle != PAD_HANDLE) return PAD_ERROR_INVALID_HANDLE;
|
||||
if (enable) NotImplemented_nid_no_patch(__func__);
|
||||
return PAD_OK;
|
||||
}
|
||||
|
||||
int APS5_VABI scePadSetLightBar(int handle, const PadLightBarParam* param) {
|
||||
|
|
|
|||
|
|
@ -61,6 +61,6 @@ int main() {
|
|||
Require(scePadClose_nid_postfix(handle) == 0);
|
||||
Require(scePadGetHandle(user, 0, 0) == noHandle);
|
||||
Require(scePadSetVibrationTriggerEffectWeakWhileEmbeddedMicInUse(true) == 0);
|
||||
Require(scePadSetAngularVelocityDeadbandState(handle, true) == 0);
|
||||
Require(scePadSetAngularVelocityDeadbandState(handle, false) == 0);
|
||||
Require(scePadSetAngularVelocityDeadbandState(handle + 1, false) == PAD_ERROR_INVALID_HANDLE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue