From 87f62991ee73d6327d789a2e903fe13c326a27a6 Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:06:56 +0200 Subject: [PATCH] Add some random return to make games at least start using this library --- src/core/libraries/np_auth/np_auth.cpp | 7 +++++-- src/core/libraries/np_auth/np_auth.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/libraries/np_auth/np_auth.cpp b/src/core/libraries/np_auth/np_auth.cpp index 9b1346192..77ba3ec1e 100644 --- a/src/core/libraries/np_auth/np_auth.cpp +++ b/src/core/libraries/np_auth/np_auth.cpp @@ -8,6 +8,8 @@ namespace Libraries::NpAuth { +static u32 auth_id = 1; + s32 PS4_SYSV_ABI sceNpAuthGetAuthorizationCode() { LOG_ERROR(Lib_NpAuth, "(STUBBED) called"); return ORBIS_OK; @@ -30,11 +32,12 @@ s32 PS4_SYSV_ABI sceNpAuthCreateAsyncRequest() { s32 PS4_SYSV_ABI sceNpAuthCreateRequest() { LOG_ERROR(Lib_NpAuth, "(STUBBED) called"); - return ORBIS_OK; + return auth_id++; } -s32 PS4_SYSV_ABI sceNpAuthDeleteRequest() { +s32 PS4_SYSV_ABI sceNpAuthDeleteRequest(u32 id) { LOG_ERROR(Lib_NpAuth, "(STUBBED) called"); + auth_id--; return ORBIS_OK; } diff --git a/src/core/libraries/np_auth/np_auth.h b/src/core/libraries/np_auth/np_auth.h index 262bb3a64..bbd5a27f0 100644 --- a/src/core/libraries/np_auth/np_auth.h +++ b/src/core/libraries/np_auth/np_auth.h @@ -16,7 +16,7 @@ s32 PS4_SYSV_ABI sceNpAuthGetIdToken(); s32 PS4_SYSV_ABI sceNpAuthAbortRequest(); s32 PS4_SYSV_ABI sceNpAuthCreateAsyncRequest(); s32 PS4_SYSV_ABI sceNpAuthCreateRequest(); -s32 PS4_SYSV_ABI sceNpAuthDeleteRequest(); +s32 PS4_SYSV_ABI sceNpAuthDeleteRequest(u32 id); s32 PS4_SYSV_ABI sceNpAuthGetAuthorizationCodeA(); s32 PS4_SYSV_ABI sceNpAuthGetAuthorizationCodeV3(); s32 PS4_SYSV_ABI sceNpAuthGetIdTokenA();