mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 23:29:55 -06:00
RTC revamp (#1867)
* get this started * implement DSi RTC commands * set up RTC clock timer. lay down basic idea of a clock. * make the date/time registers writable * move RTC state to its own structure, to make it easier to deal with * more RTC work lay base for date/time dialog * get the bulk of the RTC functionality going * much simpler design for RTC stuff * aha, that is what it is * start working on the RTC IRQ * implement all types of RTC IRQ * start refining sleep mode. code still kinda sucks. * implement keypad IRQ * refine it some more * shut the fuck uuuuuupppppppppppppp
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include <string>
|
||||
#include <QStandardPaths>
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QThread>
|
||||
#include <QSemaphore>
|
||||
@ -610,6 +611,15 @@ void WriteFirmware(const SPI_Firmware::Firmware& firmware, u32 writeoffset, u32
|
||||
|
||||
}
|
||||
|
||||
void WriteDateTime(int year, int month, int day, int hour, int minute, int second)
|
||||
{
|
||||
QDateTime hosttime = QDateTime::currentDateTime();
|
||||
QDateTime time = QDateTime(QDate(year, month, day), QTime(hour, minute, second));
|
||||
|
||||
Config::RTCOffset = hosttime.secsTo(time);
|
||||
Config::Save();
|
||||
}
|
||||
|
||||
bool MP_Init()
|
||||
{
|
||||
return LocalMP::Init();
|
||||
|
Reference in New Issue
Block a user