mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
test(libScePad): cover the scePadGetTriggerEffectState handle and argument checks
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4c7d275bef
commit
6c4e602879
2 files changed
+7
No files matched your search
@@ -591,6 +591,11 @@ static bool TriggerIs(int trigger, bool valid, std::uint32_t mode, const std::ar
|
||||
}
|
||||
|
||||
static void CheckTriggerEffect(int user, int handle) {
|
||||
PadTriggerEffectStateInformation info{};
|
||||
Require(scePadGetTriggerEffectState(0, &info) == PAD_ERROR_INVALID_HANDLE);
|
||||
Require(scePadGetTriggerEffectState(0, nullptr) == PAD_ERROR_INVALID_HANDLE);
|
||||
Require(scePadGetTriggerEffectState(handle, nullptr) == PAD_ERROR_INVALID_ARG);
|
||||
Require(scePadGetTriggerEffectState(handle, &info) == PAD_OK);
|
||||
std::array<std::uint8_t, 120> param{};
|
||||
const auto command = [&](int trigger, std::uint32_t mode, const std::array<std::uint8_t, 3>& data) {
|
||||
std::memcpy(param.data() + 8 + 56 * trigger, &mode, sizeof(mode));
|
||||
@@ -614,6 +619,7 @@ static void CheckTriggerEffect(int user, int handle) {
|
||||
command(0, 2, {2, 5, 8});
|
||||
Require(scePadSetTriggerEffect(special, param.data()) == PAD_OK && TriggerIs(0, false, 0, off, 0));
|
||||
Require(scePadClose_nid_postfix(special) == PAD_OK);
|
||||
Require(scePadGetTriggerEffectState(special, &info) == PAD_ERROR_INVALID_HANDLE);
|
||||
}
|
||||
|
||||
static void CheckAccessibilityControllerState(int handle) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
- [scePadEnableExtensionPort](../../../core/libs/prx/libScePad/Export.cpp) returns success without changing extension-port state. The boolean argument is recovered; connected-device behavior is not modeled.
|
||||
- [scePadSetLightBarBaseBrightness, scePadDisableTriggerEffect](../../../core/libs/prx/libScePad/Export.cpp) (libScePad) - return success for known handles without changing hardware states. `scePadIsLightBarBaseBrightnessControllable` reports 1 while the modifier is a no-op.
|
||||
- [scePadGetTriggerEffectState](../../../core/libs/prx/libScePad/Export.cpp) (libScePad) - returns a zeroed state for every known handle, whatever trigger effect is set. The handle and null-output errors and their order are those of the other exports in the file, not measured on a console.
|
||||
|
||||
### Unknown function info
|
||||
|
||||
|
||||
Reference in new issue
Block a user