mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 10:35:03 +00:00
some stuff needed for sonic mania
This commit is contained in:
parent
ffaa7e1cb0
commit
8f4d837b59
@ -455,6 +455,7 @@ void libcSymbolsRegister(Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("SHlt7EhOtqA", "libc", 1, "libc", 1, 1, fgetpos);
|
||||
LIB_FUNCTION("lbB+UlZqVG0", "libc", 1, "libc", 1, 1, fread);
|
||||
LIB_FUNCTION("aZK8lNei-Qw", "libc", 1, "libc", 1, 1, fputc);
|
||||
LIB_FUNCTION("Qazy8LmXTvw", "libc", 1, "libc", 1, 1, libc_ftell);
|
||||
|
||||
// misc
|
||||
LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &g_need_sceLibc);
|
||||
|
@ -66,4 +66,6 @@ int PS4_SYSV_ABI fseek(FILE* stream, long int offset, int origin) { return std::
|
||||
int PS4_SYSV_ABI fgetpos(FILE* stream, fpos_t* pos) { return std::fgetpos(stream, pos); }
|
||||
size_t PS4_SYSV_ABI fread(void* ptr, size_t size, size_t count, FILE* stream) { return std::fread(ptr, size, count, stream); }
|
||||
int PS4_SYSV_ABI fputc(int character, FILE* stream) { return std::fputc(character, stream); }
|
||||
long PS4_SYSV_ABI libc_ftell(FILE* stream) { return std::ftell(stream); }
|
||||
|
||||
} // namespace Core::Libraries::LibC
|
||||
|
@ -18,4 +18,5 @@ int PS4_SYSV_ABI fseek(FILE* stream, long int offset, int origin);
|
||||
int PS4_SYSV_ABI fgetpos(FILE* stream, fpos_t* pos);
|
||||
size_t PS4_SYSV_ABI fread(void* ptr, size_t size, size_t count, FILE* stream);
|
||||
int PS4_SYSV_ABI fputc(int character, FILE* stream);
|
||||
long PS4_SYSV_ABI libc_ftell(FILE* stream);
|
||||
} // namespace Core::Libraries::LibC
|
||||
|
@ -27,6 +27,8 @@ s32 PS4_SYSV_ABI sceSystemServiceGetStatus(SceSystemServiceStatus* status) {
|
||||
s32 PS4_SYSV_ABI sceSystemServiceParamGetInt(SceSystemServiceParamId paramId, s32* value) {
|
||||
if (paramId == 1) {
|
||||
*value = 1; //english
|
||||
} else if (paramId == 1000) {
|
||||
*value = 1;//button assing cross
|
||||
} else {
|
||||
BREAKPOINT();
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "common/log.h"
|
||||
#include "core/hle/error_codes.h"
|
||||
#include "core/hle/libraries/libs.h"
|
||||
#include "usr_mng_codes.h"
|
||||
|
||||
namespace Core::Libraries::LibUserService {
|
||||
|
||||
@ -27,10 +28,26 @@ s32 PS4_SYSV_ABI sceUserServiceGetInitialUser(SceUserServiceUserId* userId) {
|
||||
return SCE_OK;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceUserServiceGetEvent(SceUserServiceEvent* event) {
|
||||
PRINT_DUMMY_FUNCTION_NAME();
|
||||
|
||||
static bool logged_in = false;
|
||||
|
||||
if (!logged_in) {
|
||||
logged_in = true;
|
||||
event->event_type = UserServiceEventTypeLogin;
|
||||
event->user_id = 1;
|
||||
return SCE_OK;
|
||||
}
|
||||
|
||||
return SCE_USER_SERVICE_ERROR_NO_EVENT;
|
||||
}
|
||||
|
||||
void userServiceSymbolsRegister(Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("j3YMu1MVNNo", "libSceUserService", 1, "libSceUserService", 1, 1, sceUserServiceInitialize);
|
||||
LIB_FUNCTION("fPhymKNvK-A", "libSceUserService", 1, "libSceUserService", 1, 1, sceUserServiceGetLoginUserIdList);
|
||||
LIB_FUNCTION("CdWp0oHWGr0", "libSceUserService", 1, "libSceUserService", 1, 1, sceUserServiceGetInitialUser);
|
||||
LIB_FUNCTION("yH17Q6NWtVg", "libSceUserService", 1, "libSceUserService", 1, 1, sceUserServiceGetEvent);
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibUserService
|
||||
|
@ -10,6 +10,13 @@ namespace Core::Libraries::LibUserService {
|
||||
|
||||
using SceUserServiceUserId = s32;
|
||||
|
||||
enum UserServiceEventType { UserServiceEventTypeLogin, UserServiceEventTypeLogout };
|
||||
|
||||
struct SceUserServiceEvent {
|
||||
UserServiceEventType event_type;
|
||||
int user_id;
|
||||
};
|
||||
|
||||
struct SceUserServiceInitializeParams {
|
||||
s32 priority;
|
||||
};
|
||||
|
@ -9,4 +9,4 @@ constexpr int SCE_USER_SERVICE_USER_ID_INVALID = -1;//invalid user ID
|
||||
constexpr int SCE_USER_SERVICE_USER_ID_SYSTEM = 255; //generic id for device
|
||||
constexpr int SCE_USER_SERVICE_USER_ID_EVERYONE = 254; // generic id for user (mostly used in common dialogs)
|
||||
|
||||
|
||||
constexpr int SCE_USER_SERVICE_ERROR_NO_EVENT = 0x80960007;
|
||||
|
Loading…
Reference in New Issue
Block a user