mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-21 16:12:47 -05:00
Implement scePthreadGetschedparam and scePthreadSetschedparam on top of the thread priority, POSIX utimes and fsync on top of sceKernelUtimes and sceKernelFsync, and sceUserServiceGetAccessibilityZoomFollowFocus like the other accessibility queries. Add the remaining imports of PPSA12544 as unimplemented exports and record unknown NIDs and signatures in the technical debt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
159 lines
4.4 KiB
C++
159 lines
4.4 KiB
C++
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <cstring>
|
|
#include <cstdlib>
|
|
#include "prx/libc/include/Shutdown.hpp"
|
|
#include "SceTypes.hpp"
|
|
#include "prx/libc/include/General.hpp"
|
|
#include "prx/libSceSystemService/SystemService.hpp"
|
|
|
|
extern "C" {
|
|
|
|
int APS5_VABI sceSystemServiceLoadExec(const char* path, const char* const* arguments) {
|
|
if (!path || !*path) return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
if (std::strcmp(path, "exit") != 0) {
|
|
NotImplemented_nid_no_patch("sceSystemServiceLoadExec: executable replacement");
|
|
}
|
|
(void)arguments;
|
|
LibcRunShutdown_nid_postfix();
|
|
std::exit(0);
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceDisableNoticeScreenSkipFlagAutoSet(void) {
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceGetDisplaySafeAreaInfo(SystemServiceDisplaySafeAreaInfo* info) {
|
|
if (info == nullptr) {
|
|
return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
}
|
|
*info = SystemServiceDisplaySafeAreaInfo{};
|
|
info->ratio = 1.0f;
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceGetHdrToneMapLuminance(SystemServiceHdrToneMapLuminance* luminance) {
|
|
if (luminance == nullptr) {
|
|
return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
}
|
|
constexpr float SdrReferenceWhiteNits = 100.0f;
|
|
luminance->max_full_frame_tone_map_luminance = SdrReferenceWhiteNits;
|
|
luminance->max_tone_map_luminance = SdrReferenceWhiteNits;
|
|
luminance->min_tone_map_luminance = 0.0f;
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceGetNoticeScreenSkipFlag(bool* value) {
|
|
if (value == nullptr) {
|
|
return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
}
|
|
*value = false;
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceGetStatus(SystemServiceStatus* status) {
|
|
if (status == nullptr) {
|
|
return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
}
|
|
*status = SystemServiceStatus{};
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceHideSplashScreen(void) {
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceParamGetInt(int paramId, int* value) {
|
|
if (value == nullptr) {
|
|
return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
}
|
|
switch (paramId) {
|
|
case SYSTEM_SERVICE_PARAM_ID_LANG: *value = SYSTEM_SERVICE_PARAM_LANG_ENGLISH_US; break;
|
|
case SYSTEM_SERVICE_PARAM_ID_DATE_FORMAT: *value = SYSTEM_SERVICE_PARAM_DATE_FORMAT_DDMMYYYY; break;
|
|
case SYSTEM_SERVICE_PARAM_ID_TIME_FORMAT: *value = SYSTEM_SERVICE_PARAM_TIME_FORMAT_24HOUR; break;
|
|
case SYSTEM_SERVICE_PARAM_ID_TIME_ZONE: *value = 0; break;
|
|
case SYSTEM_SERVICE_PARAM_ID_SUMMERTIME: *value = 0; break;
|
|
case SYSTEM_SERVICE_PARAM_ID_GAME_PARENTAL_LEVEL: *value = SYSTEM_SERVICE_PARAM_GAME_PARENTAL_OFF; break;
|
|
case SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN: *value = SYSTEM_SERVICE_PARAM_ENTER_BUTTON_CROSS; break;
|
|
default: *value = 0; break;
|
|
}
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceParamGetString(int param_id, char* buf, size_t buf_size) {
|
|
(void)param_id;
|
|
(void)buf;
|
|
(void)buf_size;
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServicePowerTick(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceReceiveEvent(SystemServiceEvent* event) {
|
|
if (event == nullptr) {
|
|
return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
}
|
|
return SYSTEM_SERVICE_ERROR_NO_EVENT;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceReportAbnormalTermination(const void* info) {
|
|
(void)info;
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceSetNoticeScreenSkipFlag(void) {
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceInitializePlayerDialogParam(void* param) {
|
|
if (param == nullptr) return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceDisableMediaPlay() {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceReenableMediaPlay() {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceLaunchPlayerDialog(const void* param) {
|
|
if (param == nullptr) return SYSTEM_SERVICE_ERROR_PARAMETER;
|
|
return SYSTEM_SERVICE_OK;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceDisableMusicPlayer(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceOpenChallengeActivity(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceOpenTournamentOccurrence(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceReenableMusicPlayer(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSystemServiceShowControllerSettings(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
}
|