Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions core/libs/prx/libSceShare/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ int APS5_VABI sceShareCaptureScreenshotExtended(const void* extended_param, int3
}


int APS5_VABI sceShareCaptureVideoClipExtended(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
int APS5_VABI sceShareCaptureVideoClipExtended(const void* extended_param, int32_t* req_id) {
(void)extended_param;
if (req_id != nullptr) {
*req_id = REQUEST_ID_INVALID;
}
return ERROR_NOT_SUPPORTED;
}

int APS5_VABI sceShareGetRunningStatus(uint32_t* status) {
Expand Down
20 changes: 12 additions & 8 deletions core/libs/tests/GuestShare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extern "C" {
int APS5_VABI sceShareCaptureScreenshotExtended(const void* extended_param, std::int32_t* req_id);
int APS5_VABI sceShareCaptureScreenshot(const void* param, std::int32_t* req_id);
int APS5_VABI sceShareCaptureVideoClip(const void* param, std::int32_t* req_id);
int APS5_VABI sceShareCaptureVideoClipExtended(const void* extended_param, std::int32_t* req_id);
int APS5_VABI sceShareGetCurrentStatus(std::uint32_t feature_flag, void* status);
int APS5_VABI sceShareOpenMenuForContent(const void* content_id);
int APS5_VABI sceShareGetRunningStatus(std::uint32_t* status);
Expand All @@ -24,18 +25,21 @@ int main() {
constexpr std::int32_t notSupported = static_cast<std::int32_t>(0x81960007);
std::uint8_t param[64]{};

using Capture = int (APS5_VABI*)(const void*, std::int32_t*);
std::int32_t reqId = 7;
Require(sceShareCaptureScreenshotExtended(param, &reqId) == notSupported);
Require(reqId == -1);
for (Capture capture : {sceShareCaptureScreenshotExtended, sceShareCaptureVideoClipExtended}) {
reqId = 7;
Require(capture(param, &reqId) == notSupported);
Require(reqId == -1);

reqId = 7;
Require(sceShareCaptureScreenshotExtended(nullptr, &reqId) == notSupported);
Require(reqId == -1);
reqId = 7;
Require(capture(nullptr, &reqId) == notSupported);
Require(reqId == -1);

Require(sceShareCaptureScreenshotExtended(param, nullptr) == notSupported);
Require(sceShareCaptureScreenshotExtended(nullptr, nullptr) == notSupported);
Require(capture(param, nullptr) == notSupported);
Require(capture(nullptr, nullptr) == notSupported);
}

using Capture = int (APS5_VABI*)(const void*, std::int32_t*);
for (Capture capture : {sceShareCaptureScreenshot, sceShareCaptureVideoClip}) {
reqId = 7;
Require(capture(param, &reqId) == notSupported);
Expand Down
4 changes: 4 additions & 0 deletions docs/dev/debt/libSceShare.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
- [sceShareGetCurrentStatus](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - validation (feature flag non-zero, status non-null) and the all-zero 16-byte status taken from the [KytyPS5](https://github.com/KytyPS5/KytyPS5) reimplementation, not confirmed on a PS5 title; the meaning of the recording status values is unknown
- [sceShareGetRunningStatus](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - only the first 32-bit word of the status is known: PPSA01317 treats bits 0x3c of it as a running share feature and gives the call a 40-byte buffer. The host never records or broadcasts, so it stores 0 in that word and leaves the rest untouched; a null status returns `INVALID_PARAM` by analogy with `sceShareGetCurrentStatus`
- [sceShareSetContentParamForApplicationTitle](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - imported by PPSA12544's Unity plugins; the signature follows [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libShare.cpp), not confirmed on a PS5 title. The application title is only checked for null, as KytyPS5 does, since nothing is captured

### Functional

- [sceShareCaptureVideoClipExtended](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - imported by PPSA12544's Share plugin; the signature (extended parameter, request id) and the answer follow [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/147188b143f67c27d8da396e759c19336f64c105/src/libs/libShare.cpp), not confirmed on a PS5 title. Nothing is captured, so, like `sceShareCaptureScreenshotExtended`, it stores the invalid request id -1 when the pointer is not null and returns `NOT_SUPPORTED` without reading the extended parameter, whose layout is unknown
Loading