more userservice,systemservice functions implemented

This commit is contained in:
georgemoralis 2024-03-07 00:27:22 +02:00
parent ebf3a27998
commit 5c7545198e
5 changed files with 24 additions and 14 deletions

View File

@ -41,7 +41,7 @@
{ LOG_WARN_IF(true, "dummy {}()\n", __func__); }
#define PRINT_UNIMPLEMENTED_FUNCTION_NAME() \
{ LOG_ERROR_IF(true, "{}()\n", __func__); }
{ LOG_ERROR_IF(true, "Unimplemented {}()\n", __func__); }
namespace OldLibraries {

View File

@ -1708,8 +1708,10 @@ int PS4_SYSV_ABI sceSystemServiceGetAppType() {
return ORBIS_OK;
}
int PS4_SYSV_ABI sceSystemServiceGetDisplaySafeAreaInfo() {
PRINT_UNIMPLEMENTED_FUNCTION_NAME();
s32 PS4_SYSV_ABI sceSystemServiceGetDisplaySafeAreaInfo(SystemServiceDisplaySafeAreaInfo* info) {
// TODO error handling
PRINT_FUNCTION_NAME();
info->ratio = 1.0f;
return ORBIS_OK;
}

View File

@ -17,6 +17,11 @@ struct SceSystemServiceStatus {
u8 reserved[];
};
struct SystemServiceDisplaySafeAreaInfo {
float ratio;
uint8_t reserved[128];
};
int PS4_SYSV_ABI sceAppMessagingClearEventFlag();
int PS4_SYSV_ABI sceAppMessagingReceiveMsg();
int PS4_SYSV_ABI sceAppMessagingSendMsg();
@ -357,7 +362,7 @@ int PS4_SYSV_ABI sceSystemServiceGetAppIdOfBigApp();
int PS4_SYSV_ABI sceSystemServiceGetAppIdOfMiniApp();
int PS4_SYSV_ABI sceSystemServiceGetAppStatus();
int PS4_SYSV_ABI sceSystemServiceGetAppType();
int PS4_SYSV_ABI sceSystemServiceGetDisplaySafeAreaInfo();
s32 PS4_SYSV_ABI sceSystemServiceGetDisplaySafeAreaInfo(SystemServiceDisplaySafeAreaInfo* info);
int PS4_SYSV_ABI sceSystemServiceGetEventForDaemon();
int PS4_SYSV_ABI sceSystemServiceGetGpuLoadEmulationMode();
int PS4_SYSV_ABI sceSystemServiceGetHdrToneMapLuminance();
@ -488,4 +493,4 @@ int PS4_SYSV_ABI Func_6B1CDB955F0EBD65();
int PS4_SYSV_ABI Func_CB5E885E225F69F0();
void RegisterlibSceSystemService(Core::Loader::SymbolsResolver* sym);
}
} // namespace Libraries::SystemService

View File

@ -1020,8 +1020,10 @@ int PS4_SYSV_ABI sceUserServiceGetTraditionalChineseInputType() {
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUserServiceGetUserColor() {
PRINT_UNIMPLEMENTED_FUNCTION_NAME();
s32 PS4_SYSV_ABI sceUserServiceGetUserColor(int user_id,int *color) {
// TODO fix me better
PRINT_DUMMY_FUNCTION_NAME();
*color=0; // blue
return ORBIS_OK;
}
@ -1040,8 +1042,9 @@ int PS4_SYSV_ABI sceUserServiceGetUserGroupNum() {
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUserServiceGetUserName() {
PRINT_UNIMPLEMENTED_FUNCTION_NAME();
s32 PS4_SYSV_ABI sceUserServiceGetUserName(int user_id, char* user_name, std::size_t size) {
// TODO error checking and configurable username
snprintf(user_name, size, "%s", "shadps4");
return ORBIS_OK;
}

View File

@ -216,11 +216,11 @@ int PS4_SYSV_ABI sceUserServiceGetTopMenuLimitItem();
int PS4_SYSV_ABI sceUserServiceGetTopMenuNotificationFlag();
int PS4_SYSV_ABI sceUserServiceGetTopMenuTutorialFlag();
int PS4_SYSV_ABI sceUserServiceGetTraditionalChineseInputType();
int PS4_SYSV_ABI sceUserServiceGetUserColor();
s32 PS4_SYSV_ABI sceUserServiceGetUserColor(int user_id, int* color);
int PS4_SYSV_ABI sceUserServiceGetUserGroupName();
int PS4_SYSV_ABI sceUserServiceGetUserGroupNameList();
int PS4_SYSV_ABI sceUserServiceGetUserGroupNum();
int PS4_SYSV_ABI sceUserServiceGetUserName();
s32 PS4_SYSV_ABI sceUserServiceGetUserName(int user_id, char* user_name, std::size_t size);
int PS4_SYSV_ABI sceUserServiceGetUserStatus();
int PS4_SYSV_ABI sceUserServiceGetVibrationEnabled();
int PS4_SYSV_ABI sceUserServiceGetVoiceRecognitionLastUsedOsk();