mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-08 19:53:15 +00:00
core: Library cleanup (#1631)
* core: Split error codes into separate files * Reduces build times and is cleaner * core: Bring structs and enums to codebase style * core: More style changes
This commit is contained in:
parent
3d0aacd43d
commit
5b6e0ab238
114 changed files with 2158 additions and 2509 deletions
|
@ -4,9 +4,9 @@
|
|||
#include "common/config.h"
|
||||
#include "common/logging/log.h"
|
||||
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/libraries/system/userservice.h"
|
||||
#include "core/libraries/system/userservice_error.h"
|
||||
|
||||
namespace Libraries::UserService {
|
||||
|
||||
|
@ -112,7 +112,7 @@ s32 PS4_SYSV_ABI sceUserServiceGetEvent(OrbisUserServiceEvent* event) {
|
|||
|
||||
if (!logged_in) {
|
||||
logged_in = true;
|
||||
event->event = SCE_USER_SERVICE_EVENT_TYPE_LOGIN;
|
||||
event->event = OrbisUserServiceEventType::Login;
|
||||
event->userId = 1;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
@ -1041,14 +1041,14 @@ int PS4_SYSV_ABI sceUserServiceGetTraditionalChineseInputType() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceUserServiceGetUserColor(int user_id, int* color) {
|
||||
s32 PS4_SYSV_ABI sceUserServiceGetUserColor(int user_id, OrbisUserServiceUserColor* color) {
|
||||
// TODO fix me better
|
||||
LOG_INFO(Lib_UserService, "called user_id = {}", user_id);
|
||||
if (color == nullptr) {
|
||||
LOG_ERROR(Lib_UserService, "color is null");
|
||||
return ORBIS_USER_SERVICE_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
*color = ORBIS_USER_SERVICE_USER_COLOR_BLUE;
|
||||
*color = OrbisUserServiceUserColor::Blue;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue