Roamic suggestions

This commit is contained in:
Dmugetsu 2025-03-20 01:20:44 -06:00
parent d56e2326a4
commit 5d6ad5da61

View File

@ -121,7 +121,7 @@ static u64 FileTimeTo100Ns(FILETIME& ft) {
return *reinterpret_cast<u64*>(&ft); return *reinterpret_cast<u64*>(&ft);
} }
static s32 clock_gettime(u32 clock_id, struct OrbisKernelTimespec* ts) { static s32 clock_gettime(u32 clock_id, struct timespec* ts) {
switch (clock_id) { switch (clock_id) {
case CLOCK_REALTIME: case CLOCK_REALTIME:
case CLOCK_REALTIME_COARSE: { case CLOCK_REALTIME_COARSE: {
@ -273,13 +273,10 @@ int PS4_SYSV_ABI orbis_clock_gettime(s32 clock_id, struct OrbisKernelTimespec* t
} }
int PS4_SYSV_ABI sceKernelClockGettime(s32 clock_id, OrbisKernelTimespec* tp) { int PS4_SYSV_ABI sceKernelClockGettime(s32 clock_id, OrbisKernelTimespec* tp) {
struct OrbisKernelTimespec ts; const auto res = orbis_clock_gettime(clock_id, tp);
const auto res = orbis_clock_gettime(clock_id, &ts);
if (res < 0) { if (res < 0) {
return ErrnoToSceKernelError(res); return ErrnoToSceKernelError(res);
} }
tp->tv_sec = ts.tv_sec;
tp->tv_nsec = ts.tv_nsec;
return ORBIS_OK; return ORBIS_OK;
} }
@ -473,4 +470,4 @@ void RegisterTime(Core::Loader::SymbolsResolver* sym) {
LIB_FUNCTION("-o5uEDpN+oY", "libkernel", 1, "libkernel", 1, 1, sceKernelConvertUtcToLocaltime); LIB_FUNCTION("-o5uEDpN+oY", "libkernel", 1, "libkernel", 1, 1, sceKernelConvertUtcToLocaltime);
} }
} // namespace Libraries::Kernel } // namespace Libraries::Kernel