mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Quick fix rtc crash, probably gives wrong results.
This commit is contained in:
parent
1cd5421bdc
commit
6e6e71d116
1 changed files with 6 additions and 1 deletions
|
@ -140,7 +140,12 @@ void __RtcTicksToPspTime(ScePspDateTime &t, u64 ticks)
|
|||
time_t time = (ticks - rtcMagicOffset) / 1000000ULL;
|
||||
t.microsecond = ticks % 1000000ULL;
|
||||
|
||||
tm *local = gmtime(&time);
|
||||
tm *local = gmtime(&time);
|
||||
if (!local)
|
||||
{
|
||||
ERROR_LOG(HLE, "Date is too high/low to handle, pretending to work.");
|
||||
return;
|
||||
}
|
||||
|
||||
t.year = local->tm_year + 1900 - numYearAdd * 400;
|
||||
t.month = local->tm_mon + 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue