mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
sceSharePlayGetCurrentConnectionInfoA now writes a 72-byte SceSharePlayConnectionInfoA that reports no session: status DORMANT, mode 0, empty online IDs, account IDs 0 and both user IDs invalid (-1). A null pointer returns SCE_SHARE_PLAY_ERROR_INVALID_ARGS (0x810E0001) instead of throwing. KytyPS5 and fpPS4 agree on the layout and the error code; KytyPS5 sets the user IDs to -1, fpPS4 leaves them 0. Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
30 lines
785 B
C++
30 lines
785 B
C++
#include <cstdint>
|
|
#include <cstddef>
|
|
#include "SceTypes.hpp"
|
|
#include "prx/libc/include/General.hpp"
|
|
|
|
static constexpr int SCE_SHARE_PLAY_ERROR_INVALID_ARGS = static_cast<int>(0x810E0001);
|
|
static constexpr std::int32_t SCE_USER_SERVICE_USER_ID_INVALID = -1;
|
|
|
|
extern "C" {
|
|
|
|
int APS5_VABI sceSharePlayInitialize(void* heap, size_t heapSize) {
|
|
(void)heap;
|
|
if (heapSize == 0) APS5_INVALID_ARG_EX;
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSharePlayTerminate(void) {
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSharePlayGetCurrentConnectionInfoA(SharePlayConnectionInfoA* info) {
|
|
if (info == nullptr) return SCE_SHARE_PLAY_ERROR_INVALID_ARGS;
|
|
*info = {};
|
|
info->hostUserId = SCE_USER_SERVICE_USER_ID_INVALID;
|
|
info->visitorUserId = SCE_USER_SERVICE_USER_ID_INVALID;
|
|
return 0;
|
|
}
|
|
|
|
}
|