mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-07-09 17:25:37 -06:00
sceNpGetSdkVersion
This commit is contained in:
parent
1e25d73f48
commit
83956518e3
@ -390,6 +390,17 @@ s32 PS4_SYSV_ABI sceNpIntIsValidOnlineId(const OrbisNpOnlineId* id) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void PS4_SYSV_ABI sceNpGetSdkVersion(char* version_buf) {
|
||||
LOG_DEBUG(Lib_NpCommon, "called");
|
||||
// Real library has no parameter checks, so I guess this is purely for internal use?
|
||||
Libraries::Kernel::SwVersionStruct sw_version{};
|
||||
sw_version.struct_size = 0x28;
|
||||
Libraries::Kernel::sceKernelGetSystemSwVersion(&sw_version);
|
||||
u32 sw_hex = sw_version.hex_representation;
|
||||
snprintf(version_buf, 8, "%d.%02d", ((sw_hex >> 0x18) & 0xf) + ((sw_hex >> 0x1c) * 10),
|
||||
((sw_hex >> 0x10) & 0xf) + (((sw_hex >> 0x14) & 0xf) * 10));
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceNpCalloutInitCtx(OrbisNpCalloutContext* callout_ctx, const char* name,
|
||||
u64 stack_size, s32 priority, u64 affinity_mask) {
|
||||
LOG_DEBUG(Lib_NpCommon, "ctx={:p} name={:p} stack={:#x} priority={} affinity={:#x}",
|
||||
@ -600,6 +611,7 @@ void RegisterLib(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("ss2xO9IJxKQ", "libSceNpCommon", 1, "libSceNpCommon", sceNpCondTimedwait);
|
||||
LIB_FUNCTION("uEwag-0YZPc", "libSceNpCommon", 1, "libSceNpCommon", sceNpMutexInit);
|
||||
LIB_FUNCTION("uMJFOA62mVU", "libSceNpCommon", 1, "libSceNpCommon", sceNpCondSignal);
|
||||
LIB_FUNCTION("Pglk7zFj0DI", "libSceNpCommon", 1, "libSceNpCommon", sceNpGetSdkVersion);
|
||||
};
|
||||
|
||||
} // namespace Libraries::Np::NpCommon
|
||||
|
||||
@ -62,6 +62,7 @@ u32 PS4_SYSV_ABI sceNpJoinThread(Libraries::Kernel::PthreadT thread, void** ret)
|
||||
s32 PS4_SYSV_ABI sceNpGetSystemClockUsec(s64* usec);
|
||||
s32 PS4_SYSV_ABI sceNpGetPlatformType(const OrbisNpId* np_id);
|
||||
s32 PS4_SYSV_ABI sceNpIntIsValidOnlineId(const OrbisNpOnlineId* id);
|
||||
void PS4_SYSV_ABI sceNpGetSdkVersion(char* version_buf);
|
||||
s32 PS4_SYSV_ABI sceNpCalloutInitCtx(OrbisNpCalloutContext* ctx, const char* name, u64 stack_size,
|
||||
s32 priority, u64 affinity_mask);
|
||||
s32 PS4_SYSV_ABI sceNpCalloutStartOnCtx(OrbisNpCalloutContext* ctx, OrbisNpCalloutEntry* callout,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user