Skip to content

Commit

Permalink
Disable the time function, after start core is not working fine.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Jan 6, 2019
1 parent bd9146e commit 3bb0c7c
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions ps2/compat_files/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ static time_t _gmtotime_t (
return seconds_from_1970;
}

time_t ps2_time(time_t *t) {
time_t tim;
sceCdCLOCK clocktime; /* defined in libcdvd.h */

sceCdReadClock(&clocktime); /* libcdvd.a */
configConvertToLocalTime(&clocktime);

tim = _gmtotime_t (DEC(clocktime.year)+ STARTING_YEAR,
DEC(clocktime.month),
DEC(clocktime.day),
DEC(clocktime.hour),
DEC(clocktime.minute),
DEC(clocktime.second));

if(t)
*t = tim;

return tim;
}

/* Protected methods in libc */
void _ps2sdk_time_init(void)
{
Expand All @@ -88,21 +108,7 @@ clock_t clock(void)
}

time_t time(time_t *t) {
time_t tim;
sceCdCLOCK clocktime; /* defined in libcdvd.h */

sceCdReadClock(&clocktime); /* libcdvd.a */
configConvertToLocalTime(&clocktime);

tim = _gmtotime_t (DEC(clocktime.year)+ STARTING_YEAR,
DEC(clocktime.month),
DEC(clocktime.day),
DEC(clocktime.hour),
DEC(clocktime.minute),
DEC(clocktime.second));

if(t)
*t = tim;

return tim;
time_t tim = -1;
/* TODO: This function need to be implemented again because the SDK one is not working fine */
return time;
}

0 comments on commit 3bb0c7c

Please sign in to comment.