TimingEvents: Use function pointers instead of std::function

This commit is contained in:
Connor McLaughlin
2021-01-10 01:43:59 +10:00
parent 8c241ed8de
commit 11992bde4e
10 changed files with 56 additions and 35 deletions

View File

@ -17,7 +17,9 @@ Pad::~Pad() = default;
void Pad::Initialize()
{
m_transfer_event = TimingEvents::CreateTimingEvent(
"Pad Serial Transfer", 1, 1, std::bind(&Pad::TransferEvent, this, std::placeholders::_2), false);
"Pad Serial Transfer", 1, 1,
[](void* param, TickCount ticks, TickCount ticks_late) { static_cast<Pad*>(param)->TransferEvent(ticks_late); },
this, false);
Reset();
}