diff --git a/src/core/hle/libraries/libc/libc.cpp b/src/core/hle/libraries/libc/libc.cpp index 6e5ac14e8..a210a94fe 100644 --- a/src/core/hle/libraries/libc/libc.cpp +++ b/src/core/hle/libraries/libc/libc.cpp @@ -416,6 +416,7 @@ void libcSymbolsRegister(Loader::SymbolsResolver* sym) { LIB_FUNCTION("AEJdIVZTEmo", "libc", 1, "libc", 1, 1, qsort); LIB_FUNCTION("zlfEH8FmyUA", "libc", 1, "libc", 1, 1, _Stoul); LIB_FUNCTION("VPbJwTCgME0", "libc", 1, "libc", 1, 1, srand); + LIB_FUNCTION("wLlFkwG9UcQ", "libc", 1, "libc", 1, 1, time); // math functions LIB_FUNCTION("EH-x713A99c", "libc", 1, "libc", 1, 1, atan2f); diff --git a/src/core/hle/libraries/libc/libc_stdlib.cpp b/src/core/hle/libraries/libc/libc_stdlib.cpp index 21d9b36fc..0f6309c0d 100644 --- a/src/core/hle/libraries/libc/libc_stdlib.cpp +++ b/src/core/hle/libraries/libc/libc_stdlib.cpp @@ -40,4 +40,5 @@ unsigned long int PS4_SYSV_ABI _Stoul(const char* str, char** endptr, int base) void PS4_SYSV_ABI srand(unsigned int seed) { return std::srand(seed); } +s64 PS4_SYSV_ABI time(s64* pt) { return std::time(pt); } } // namespace Core::Libraries::LibC diff --git a/src/core/hle/libraries/libc/libc_stdlib.h b/src/core/hle/libraries/libc/libc_stdlib.h index a6928910f..5e6906faa 100644 --- a/src/core/hle/libraries/libc/libc_stdlib.h +++ b/src/core/hle/libraries/libc/libc_stdlib.h @@ -13,4 +13,5 @@ void PS4_SYSV_ABI qsort(void* ptr, size_t count, size_t size, int(PS4_SYSV_ABI* int PS4_SYSV_ABI rand(); unsigned long int PS4_SYSV_ABI _Stoul(const char* str, char** endptr, int base); void PS4_SYSV_ABI srand(unsigned int seed); +s64 PS4_SYSV_ABI time(s64* pt); } // namespace Core::Libraries::LibC diff --git a/src/core/hle/libraries/libsystemservice/system_service.cpp b/src/core/hle/libraries/libsystemservice/system_service.cpp index 314dae47f..3ee24918e 100644 --- a/src/core/hle/libraries/libsystemservice/system_service.cpp +++ b/src/core/hle/libraries/libsystemservice/system_service.cpp @@ -3,6 +3,7 @@ #include "common/log.h" #include "core/hle/error_codes.h" #include "core/hle/libraries/libs.h" +#include namespace Core::Libraries::LibSystemService { @@ -23,9 +24,20 @@ s32 PS4_SYSV_ABI sceSystemServiceGetStatus(SceSystemServiceStatus* status) { return SCE_OK; } +s32 PS4_SYSV_ABI sceSystemServiceParamGetInt(SceSystemServiceParamId paramId, s32* value) { + if (paramId == 1) { + *value = 1; //english + } else { + BREAKPOINT(); + } + return SCE_OK; +} + + void systemServiceSymbolsRegister(Loader::SymbolsResolver* sym) { LIB_FUNCTION("Vo5V8KAwCmk", "libSceSystemService", 1, "libSceSystemService", 1, 1, sceSystemServiceHideSplashScreen); LIB_FUNCTION("rPo6tV8D9bM", "libSceSystemService", 1, "libSceSystemService", 1, 1, sceSystemServiceGetStatus); + LIB_FUNCTION("fZo48un7LK4", "libSceSystemService", 1, "libSceSystemService", 1, 1, sceSystemServiceParamGetInt); } }; // namespace Core::Libraries::LibSystemService diff --git a/src/core/hle/libraries/libsystemservice/system_service.h b/src/core/hle/libraries/libsystemservice/system_service.h index af2e358df..28bb4c164 100644 --- a/src/core/hle/libraries/libsystemservice/system_service.h +++ b/src/core/hle/libraries/libsystemservice/system_service.h @@ -8,6 +8,7 @@ class SymbolsResolver; namespace Core::Libraries::LibSystemService { +using SceSystemServiceParamId = s32; struct SceSystemServiceStatus { s32 eventNum; bool isSystemUiOverlaid; @@ -20,6 +21,7 @@ struct SceSystemServiceStatus { s32 PS4_SYSV_ABI sceSystemServiceHideSplashScreen(); s32 PS4_SYSV_ABI sceSystemServiceGetStatus(SceSystemServiceStatus* status); +s32 PS4_SYSV_ABI sceSystemServiceParamGetInt(SceSystemServiceParamId paramId, s32* value); void systemServiceSymbolsRegister(Loader::SymbolsResolver* sym);