don't use std::map and std::function in scheduler

This commit is contained in:
RSDuck
2024-11-20 02:55:40 +01:00
parent f6f993cb41
commit d0d010b09d
12 changed files with 68 additions and 59 deletions

View File

@ -34,7 +34,7 @@ void WriteDateTime(int num, u8 val);
RTC::RTC(melonDS::NDS& nds) : NDS(nds)
{
NDS.RegisterEventFunc(Event_RTC, 0, MemberEventFunc(RTC, ClockTimer));
NDS.RegisterEventFuncs(Event_RTC, this, {MakeEventThunk(RTC, ClockTimer)});
ResetState();
@ -45,7 +45,7 @@ RTC::RTC(melonDS::NDS& nds) : NDS(nds)
RTC::~RTC()
{
NDS.UnregisterEventFunc(Event_RTC, 0);
NDS.UnregisterEventFuncs(Event_RTC);
}
void RTC::Reset()