convert RTC to OOP

This commit is contained in:
Arisotura
2023-11-03 21:20:09 +01:00
parent 440b356674
commit e4f4e94694
6 changed files with 138 additions and 109 deletions

View File

@ -597,8 +597,8 @@ void SetDateTime()
QDateTime hosttime = QDateTime::currentDateTime();
QDateTime time = hosttime.addSecs(Config::RTCOffset);
RTC::SetDateTime(time.date().year(), time.date().month(), time.date().day(),
time.time().hour(), time.time().minute(), time.time().second());
NDS::RTC->SetDateTime(time.date().year(), time.date().month(), time.date().day(),
time.time().hour(), time.time().minute(), time.time().second());
}
void Reset()

View File

@ -361,7 +361,7 @@ void EmuThread::run()
RTC::StateData state;
Platform::FileRead(&state, sizeof(state), 1, file);
Platform::CloseFile(file);
RTC::SetState(state);
NDS::RTC->SetState(state);
}
char melontitle[100];
@ -666,7 +666,7 @@ void EmuThread::run()
if (file)
{
RTC::StateData state;
RTC::GetState(state);
NDS::RTC->GetState(state);
Platform::FileWrite(&state, sizeof(state), 1, file);
Platform::CloseFile(file);
}