From 7e6c741ed73527f729f85f6fc4c846a537c281b2 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sat, 11 Nov 2023 16:25:53 +0200 Subject: [PATCH] added sceSystemServiceGetStatus --- .../libsystemservice/system_service.cpp | 23 +++++++++++++++---- .../libsystemservice/system_service.h | 13 ++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/core/hle/libraries/libsystemservice/system_service.cpp b/src/core/hle/libraries/libsystemservice/system_service.cpp index 85023606..314dae47 100644 --- a/src/core/hle/libraries/libsystemservice/system_service.cpp +++ b/src/core/hle/libraries/libsystemservice/system_service.cpp @@ -1,7 +1,8 @@ +#include "core/hle/libraries/libsystemservice/system_service.h" + #include "common/log.h" #include "core/hle/error_codes.h" #include "core/hle/libraries/libs.h" -#include "core/hle/libraries/libsystemservice/system_service.h" namespace Core::Libraries::LibSystemService { @@ -10,9 +11,21 @@ s32 PS4_SYSV_ABI sceSystemServiceHideSplashScreen() { return SCE_OK; } -void systemServiceSymbolsRegister(Loader::SymbolsResolver* sym) { - LIB_FUNCTION("Vo5V8KAwCmk", "libSceSystemService", 1, "libSceSystemService", 1, 1, - sceSystemServiceHideSplashScreen); +s32 PS4_SYSV_ABI sceSystemServiceGetStatus(SceSystemServiceStatus* status) { + SceSystemServiceStatus st = {}; + st.eventNum = 0; + st.isSystemUiOverlaid = false; + st.isInBackgroundExecution = false; + st.isCpuMode7CpuNormal = true; + st.isGameLiveStreamingOnAir = false; + st.isOutOfVrPlayArea = false; + *status = st; + return SCE_OK; } -}; // namespace Core::Libraries::LibSystemService +void systemServiceSymbolsRegister(Loader::SymbolsResolver* sym) { + LIB_FUNCTION("Vo5V8KAwCmk", "libSceSystemService", 1, "libSceSystemService", 1, 1, sceSystemServiceHideSplashScreen); + LIB_FUNCTION("rPo6tV8D9bM", "libSceSystemService", 1, "libSceSystemService", 1, 1, sceSystemServiceGetStatus); +} + +}; // 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 1b31cab3..af2e358d 100644 --- a/src/core/hle/libraries/libsystemservice/system_service.h +++ b/src/core/hle/libraries/libsystemservice/system_service.h @@ -8,8 +8,19 @@ class SymbolsResolver; namespace Core::Libraries::LibSystemService { +struct SceSystemServiceStatus { + s32 eventNum; + bool isSystemUiOverlaid; + bool isInBackgroundExecution; + bool isCpuMode7CpuNormal; + bool isGameLiveStreamingOnAir; + bool isOutOfVrPlayArea; + u08 reserved[]; +}; + s32 PS4_SYSV_ABI sceSystemServiceHideSplashScreen(); +s32 PS4_SYSV_ABI sceSystemServiceGetStatus(SceSystemServiceStatus* status); void systemServiceSymbolsRegister(Loader::SymbolsResolver* sym); -}; // namespace Core::Libraries::LibSystemService +}; // namespace Core::Libraries::LibSystemService