SI_Device: Move implementation details into the cpp file
Any changes to the base class' default behavior now won't require all SI device source files to be recompiled.
This commit is contained in:
parent
fb8f19f553
commit
0adb0dfeef
|
@ -18,6 +18,23 @@
|
|||
#include "Core/HW/SI/SI_DeviceKeyboard.h"
|
||||
#include "Core/HW/SI/SI_DeviceNull.h"
|
||||
|
||||
ISIDevice::ISIDevice(SIDevices device_type, int device_number)
|
||||
: m_device_number(device_number), m_device_type(device_type)
|
||||
{
|
||||
}
|
||||
|
||||
ISIDevice::~ISIDevice() = default;
|
||||
|
||||
int ISIDevice::GetDeviceNumber() const
|
||||
{
|
||||
return m_device_number;
|
||||
}
|
||||
|
||||
SIDevices ISIDevice::GetDeviceType() const
|
||||
{
|
||||
return m_device_type;
|
||||
}
|
||||
|
||||
int ISIDevice::RunBuffer(u8* buffer, int length)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
@ -48,6 +65,10 @@ int ISIDevice::TransferInterval()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ISIDevice::DoState(PointerWrap& p)
|
||||
{
|
||||
}
|
||||
|
||||
// Check if a device class is inheriting from CSIDevice_GCController
|
||||
// The goal of this function is to avoid special casing a long list of
|
||||
// device types when there is no "real" input device, e.g. when playing
|
||||
|
|
|
@ -73,14 +73,12 @@ enum SIDevices : int
|
|||
class ISIDevice
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
ISIDevice(SIDevices device_type, int device_number)
|
||||
: m_device_number(device_number), m_device_type(device_type)
|
||||
{
|
||||
}
|
||||
ISIDevice(SIDevices device_type, int device_number);
|
||||
virtual ~ISIDevice();
|
||||
|
||||
int GetDeviceNumber() const;
|
||||
SIDevices GetDeviceType() const;
|
||||
|
||||
// Destructor
|
||||
virtual ~ISIDevice() {}
|
||||
// Run the SI Buffer
|
||||
virtual int RunBuffer(u8* buffer, int length);
|
||||
virtual int TransferInterval();
|
||||
|
@ -92,9 +90,7 @@ public:
|
|||
virtual void SendCommand(u32 command, u8 poll) = 0;
|
||||
|
||||
// Savestate support
|
||||
virtual void DoState(PointerWrap& p) {}
|
||||
int GetDeviceNumber() const { return m_device_number; }
|
||||
SIDevices GetDeviceType() const { return m_device_type; }
|
||||
virtual void DoState(PointerWrap& p);
|
||||
|
||||
protected:
|
||||
int m_device_number;
|
||||
|
|
Loading…
Reference in New Issue