mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
libSceRazorCpu is the CPU-side instrumentation for the Razor capture tool. AnyPS5 does not host that tool, so the instrumentation does nothing and succeeds, which is also what shadPS4 does: - sceRazorCpuIsCapturing -> 0 (no capture is in progress, so titles skip their profiling paths) - sceRazorCpuJobManagerDispatch / sceRazorCpuJobManagerJob / sceRazorCpuJobManagerSequence -> 0 These only feed the profiler; they do not affect execution. Adds a CMakeLists.txt so the library can carry its guest test. New test core/libs/tests/GuestRazorCpu.cpp checks the four return values; it fails on main (the functions throw) and passes with the change.
24 lines
644 B
C++
24 lines
644 B
C++
#include "prx/libc/include/general/VabiMacros.hpp"
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
|
|
extern "C" {
|
|
std::uint32_t APS5_VABI sceRazorCpuIsCapturing(void);
|
|
int APS5_VABI sceRazorCpuJobManagerDispatch(const void* args);
|
|
int APS5_VABI sceRazorCpuJobManagerJob(const void* args);
|
|
int APS5_VABI sceRazorCpuJobManagerSequence(const void* args);
|
|
}
|
|
|
|
namespace {
|
|
|
|
void Require(bool value) { if (!value) std::abort(); }
|
|
|
|
}
|
|
|
|
int main() {
|
|
Require(sceRazorCpuIsCapturing() == 0);
|
|
Require(sceRazorCpuJobManagerDispatch(nullptr) == 0);
|
|
Require(sceRazorCpuJobManagerJob(nullptr) == 0);
|
|
Require(sceRazorCpuJobManagerSequence(nullptr) == 0);
|
|
}
|