summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorMichael Maltese <mchtly@gmail.com>2017-03-31 14:13:48 -0700
committerMichael Maltese <mchtly@gmail.com>2017-07-14 13:57:17 -0700
commit05ab03a5515c97eff89368963170bfaa0cc9a90b (patch)
tree2576568b44ad2ac142fce3774907cd3e80fee1d9 /Source/Core
parentff78327643920a0592d2322cba7ecc700166e636 (diff)
SI_DeviceGBA: make GBASockServer a member instead of parent
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/SI/SI_DeviceGBA.cpp10
-rw-r--r--Source/Core/Core/HW/SI/SI_DeviceGBA.h3
2 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/Core/HW/SI/SI_DeviceGBA.cpp b/Source/Core/Core/HW/SI/SI_DeviceGBA.cpp
index 8e13b03d04..add3b11f7c 100644
--- a/Source/Core/Core/HW/SI/SI_DeviceGBA.cpp
+++ b/Source/Core/Core/HW/SI/SI_DeviceGBA.cpp
@@ -293,14 +293,14 @@ int CSIDevice_GBA::RunBuffer(u8* buffer, int length)
{
case NextAction::SendCommand:
{
- ClockSync();
- if (Connect())
+ m_sock_server.ClockSync();
+ if (m_sock_server.Connect())
{
#ifdef _DEBUG
NOTICE_LOG(SERIALINTERFACE, "%01d cmd %02x [> %02x%02x%02x%02x]", m_device_number, buffer[3],
buffer[2], buffer[1], buffer[0], buffer[7]);
#endif
- Send(buffer);
+ m_sock_server.Send(buffer);
}
m_last_cmd = buffer[3];
m_timestamp_sent = CoreTiming::GetTicks();
@@ -320,8 +320,8 @@ int CSIDevice_GBA::RunBuffer(u8* buffer, int length)
// [[fallthrough]]
case NextAction::ReceiveResponse:
{
- int num_data_received = Receive(buffer);
- if (IsConnected())
+ int num_data_received = m_sock_server.Receive(buffer);
+ if (m_sock_server.IsConnected())
{
#ifdef _DEBUG
LogTypes::LOG_LEVELS log_level = (m_last_cmd == CMD_STATUS || m_last_cmd == CMD_RESET) ?
diff --git a/Source/Core/Core/HW/SI/SI_DeviceGBA.h b/Source/Core/Core/HW/SI/SI_DeviceGBA.h
index 92d7637ed5..6e1467b88d 100644
--- a/Source/Core/Core/HW/SI/SI_DeviceGBA.h
+++ b/Source/Core/Core/HW/SI/SI_DeviceGBA.h
@@ -40,7 +40,7 @@ private:
bool m_booted = false;
};
-class CSIDevice_GBA : public ISIDevice, private GBASockServer
+class CSIDevice_GBA : public ISIDevice
{
public:
CSIDevice_GBA(SIDevices device, int device_number);
@@ -58,6 +58,7 @@ private:
ReceiveResponse
};
+ GBASockServer m_sock_server;
NextAction m_next_action = NextAction::SendCommand;
u8 m_last_cmd;
u64 m_timestamp_sent = 0;