Files
AnyPS5/core/libs/tests/GuestSaveDataCancel.cpp
Dean Galvin ec2bb21e70 fix(savedata): export sceSaveDataCancel
Palworld (PPSA23126) imports sceSaveDataCancel (e6y3WMBYbiM) from
libSceSaveData and fails to load because no library exports it. Its
signature is unknown, so it is exported without an implementation and
throws if it is called, like sceSaveDataConvert.
2026-10-10 21:22:48 +13:00

19 lines
567 B
C++

#include "prx/libc/include/general/VabiMacros.hpp"
#include <cstdio>
#include <stdexcept>
#include <string>
extern "C" int APS5_VABI sceSaveDataCancel();
int main() {
try {
sceSaveDataCancel();
} catch (const std::runtime_error& error) {
if (std::string(error.what()) == "sceSaveDataCancel not implemented") return 0;
std::fprintf(stderr, "sceSaveDataCancel threw: %s\n", error.what());
return 1;
}
std::fprintf(stderr, "sceSaveDataCancel returned instead of reporting that it is not implemented\n");
return 1;
}