rpcsx/rpcs3/AppConnector.cpp
Bigpet 25c3aa8e19 fixes to get llvm to compile (excepti for utils.cpp, that'll get fixed
later)

Eradicate the Array almost everywhere, some usages like Stack still
remains
2014-04-12 12:06:52 +02:00

33 lines
972 B
C++

#include "stdafx.h"
#include "AppConnector.h"
AppConnector::~AppConnector()
{
for(auto& connection : m_connect_arr)
{
wxGetApp().Disconnect(
connection.winid,
connection.lastId,
connection.eventType,
connection.func,
connection.userData,
connection.eventSink);
}
}
void AppConnector::Connect(int winid, int lastId, int eventType, wxObjectEventFunction func, wxObject* userData, wxEvtHandler* eventSink)
{
m_connect_arr.emplace_back(winid, lastId, eventType, func, userData, eventSink);
wxGetApp().Connect(winid, lastId, eventType, func, userData, eventSink);
}
void AppConnector::Connect(int winid, int eventType, wxObjectEventFunction func, wxObject* userData, wxEvtHandler* eventSink)
{
Connect(winid, wxID_ANY, eventType, func, userData, eventSink);
}
void AppConnector::Connect(int eventType, wxObjectEventFunction func, wxObject* userData, wxEvtHandler* eventSink)
{
Connect(wxID_ANY, wxID_ANY, eventType, func, userData, eventSink);
}