mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
sceContentExportStart hands out positive session ids, at most 10 live (SharpProspero MaxExecution), and sceContentExportFinish closes them. sceContentExportGetProgress, sceContentExportCancel and sceContentExportFromDataWithThumbnail take their Orbital signatures and check the session. The host has no media library to export into, so FromDataWithThumbnail throws before it calls either data callback, and GetProgress and Cancel throw for a live session since no export ever runs and their result for an idle session is unknown. An eleventh Start and Term with live sessions throw. Titles: Cult of the Lamb PPSA06465 imports GetProgress, Cancel and FromDataWithThumbnail (#2686); PPSA21564 (#271) and Cyberpunk 2077 PPSA04029 (#266) import Start. Sources: Orbital tools/ida/db_types.json (cc408367) for the signatures, SharpProspero Interop/Content/ContentExport.cs (5dfdb4b0) for the session model and MaxExecution, shadPS4 content_export.h (443f0224) for the parameter and callback layouts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 473d6dd355d2c0ee22f9792927e0e465846569cf)
40 lines
1.4 KiB
C++
40 lines
1.4 KiB
C++
#include "prx/libc/include/general/VabiMacros.hpp"
|
|
|
|
#include <cstdio>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
extern "C" {
|
|
int APS5_VABI sceContentDeleteById();
|
|
int APS5_VABI sceContentSearchGetContentLastUpdateId();
|
|
int APS5_VABI sceContentSearchOpenMetadataByContentId();
|
|
int APS5_VABI sceContentSearchGetTotalContentSize();
|
|
int APS5_VABI sceContentSearchGetNumOfContent();
|
|
}
|
|
|
|
namespace {
|
|
|
|
bool ReportsNotImplemented(const char* name, int (APS5_VABI *function)()) {
|
|
try {
|
|
function();
|
|
} catch (const std::runtime_error& error) {
|
|
if (std::string(error.what()) == std::string(name) + " not implemented") return true;
|
|
std::fprintf(stderr, "%s threw: %s\n", name, error.what());
|
|
return false;
|
|
}
|
|
std::fprintf(stderr, "%s returned instead of reporting that it is not implemented\n", name);
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
int main() {
|
|
bool correct = true;
|
|
correct &= ReportsNotImplemented("sceContentDeleteById", sceContentDeleteById);
|
|
correct &= ReportsNotImplemented("sceContentSearchGetContentLastUpdateId", sceContentSearchGetContentLastUpdateId);
|
|
correct &= ReportsNotImplemented("sceContentSearchOpenMetadataByContentId", sceContentSearchOpenMetadataByContentId);
|
|
correct &= ReportsNotImplemented("sceContentSearchGetTotalContentSize", sceContentSearchGetTotalContentSize);
|
|
correct &= ReportsNotImplemented("sceContentSearchGetNumOfContent", sceContentSearchGetNumOfContent);
|
|
return correct ? 0 : 1;
|
|
}
|