SI_DeviceGBA: remove duplication of GBASockServer destructor logic
This commit is contained in:
parent
e6cfc3a75b
commit
ff78327643
|
@ -287,11 +287,6 @@ CSIDevice_GBA::CSIDevice_GBA(SIDevices device, int device_number) : ISIDevice(de
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CSIDevice_GBA::~CSIDevice_GBA()
|
|
||||||
{
|
|
||||||
GBASockServer::Disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
int CSIDevice_GBA::RunBuffer(u8* buffer, int length)
|
int CSIDevice_GBA::RunBuffer(u8* buffer, int length)
|
||||||
{
|
{
|
||||||
switch (m_next_action)
|
switch (m_next_action)
|
||||||
|
|
|
@ -24,8 +24,6 @@ public:
|
||||||
GBASockServer();
|
GBASockServer();
|
||||||
~GBASockServer();
|
~GBASockServer();
|
||||||
|
|
||||||
void Disconnect();
|
|
||||||
|
|
||||||
bool Connect();
|
bool Connect();
|
||||||
bool IsConnected();
|
bool IsConnected();
|
||||||
void ClockSync();
|
void ClockSync();
|
||||||
|
@ -33,6 +31,8 @@ public:
|
||||||
int Receive(u8* si_buffer);
|
int Receive(u8* si_buffer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void Disconnect();
|
||||||
|
|
||||||
std::unique_ptr<sf::TcpSocket> m_client;
|
std::unique_ptr<sf::TcpSocket> m_client;
|
||||||
std::unique_ptr<sf::TcpSocket> m_clock_sync;
|
std::unique_ptr<sf::TcpSocket> m_clock_sync;
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ class CSIDevice_GBA : public ISIDevice, private GBASockServer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CSIDevice_GBA(SIDevices device, int device_number);
|
CSIDevice_GBA(SIDevices device, int device_number);
|
||||||
~CSIDevice_GBA();
|
|
||||||
|
|
||||||
int RunBuffer(u8* buffer, int length) override;
|
int RunBuffer(u8* buffer, int length) override;
|
||||||
int TransferInterval() override;
|
int TransferInterval() override;
|
||||||
|
|
Loading…
Reference in New Issue