diff options
author | Arisotura <thetotalworm@gmail.com> | 2023-11-02 21:04:09 +0100 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2023-11-02 21:04:09 +0100 |
commit | 70c6750561b0c130b430e2ec3d076708b3767674 (patch) | |
tree | f2cc1b0aad735f9be60e5f837ceca120980ca682 /src/Wifi.cpp | |
parent | 5ccd3916ff719ea4ed49030077794fadda048cb9 (diff) |
better, less hacky, more OOP-friendly scheduler design
Diffstat (limited to 'src/Wifi.cpp')
-rw-r--r-- | src/Wifi.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Wifi.cpp b/src/Wifi.cpp index d786cd0..c5a67ab 100644 --- a/src/Wifi.cpp +++ b/src/Wifi.cpp @@ -150,6 +150,8 @@ u64 RXTimestamp; bool Init() { + NDS::RegisterEventFunc(NDS::Event_Wifi, 0, USTimer); + //MPInited = false; //LANInited = false; @@ -172,6 +174,8 @@ void DeInit() Platform::LAN_DeInit(); WifiAP::DeInit(); + + NDS::UnregisterEventFunc(NDS::Event_Wifi, 0); } void Reset() @@ -359,7 +363,7 @@ void ScheduleTimer(bool first) s32 delay = (cycles + 999999) / 1000000; TimerError = (delay * 1000000) - cycles; - NDS::ScheduleEvent(NDS::Event_Wifi, !first, delay, USTimer, 0); + NDS::ScheduleEvent(NDS::Event_Wifi, !first, delay, 0, 0); } void UpdatePowerOn() |