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

@ -91,7 +91,7 @@ bool MACIsBroadcast(const u8* a)
Wifi::Wifi(melonDS::NDS& nds) : NDS(nds)
{
NDS.RegisterEventFunc(Event_Wifi, 0, MemberEventFunc(Wifi, USTimer));
NDS.RegisterEventFuncs(Event_Wifi, this, {MakeEventThunk(Wifi, USTimer)});
WifiAP = new class WifiAP(this, NDS.UserData);
}
@ -100,7 +100,7 @@ Wifi::~Wifi()
{
delete WifiAP; WifiAP = nullptr;
NDS.UnregisterEventFunc(Event_Wifi, 0);
NDS.UnregisterEventFuncs(Event_Wifi);
}
void Wifi::Reset()