2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 14:24:56 +00:00

Update submodules

This commit is contained in:
2019-09-09 04:21:01 -07:00
parent f07fc458d2
commit e2ab93dfac
6 changed files with 6 additions and 11 deletions

View File

@@ -59,16 +59,14 @@ u64 CBasics::GetGCTicks() {
const u64 CBasics::SECONDS_TO_2000 = 946684800LL;
const u64 CBasics::TICKS_PER_SECOND = 60750000LL;
#ifndef _WIN32
static struct tm* localtime_r(const time_t& time, struct tm& timeSt, long& gmtOff) {
#ifndef _WIN32
auto ret = ::localtime_r(&time, &timeSt);
if (!ret)
return nullptr;
gmtOff = ret->tm_gmtoff;
return ret;
}
#else
static struct tm* localtime_r(const time_t& time, struct tm& timeSt, long& gmtOff) {
struct tm _gmSt;
auto reta = localtime_s(&timeSt, &time);
auto retb = gmtime_s(&_gmSt, &time);
@@ -76,8 +74,8 @@ static struct tm* localtime_r(const time_t& time, struct tm& timeSt, long& gmtOf
return nullptr;
gmtOff = mktime(&timeSt) - mktime(&_gmSt);
return &timeSt;
}
#endif
}
OSTime CBasics::ToWiiTime(std::chrono::system_clock::time_point time) {
auto sec = std::chrono::time_point_cast<std::chrono::seconds>(time);