[SI] add a way to check if the current controller is a gcpad
(or gcpad-compatible)
This commit is contained in:
parent
2282651fdb
commit
d61ef9a95a
|
@ -67,6 +67,26 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 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
|
||||||
|
// a TAS movie, or netplay input.
|
||||||
|
bool SIDevice_IsGCController(SIDevices type)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case SIDEVICE_GC_CONTROLLER:
|
||||||
|
case SIDEVICE_WIIU_ADAPTER:
|
||||||
|
case SIDEVICE_GC_TARUKONGA:
|
||||||
|
case SIDEVICE_DANCEMAT:
|
||||||
|
case SIDEVICE_GC_STEERING:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// F A C T O R Y
|
// F A C T O R Y
|
||||||
std::unique_ptr<ISIDevice> SIDevice_Create(const SIDevices device, const int port_number)
|
std::unique_ptr<ISIDevice> SIDevice_Create(const SIDevices device, const int port_number)
|
||||||
{
|
{
|
||||||
|
|
|
@ -107,4 +107,6 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool SIDevice_IsGCController(SIDevices type);
|
||||||
|
|
||||||
std::unique_ptr<ISIDevice> SIDevice_Create(const SIDevices device, const int port_number);
|
std::unique_ptr<ISIDevice> SIDevice_Create(const SIDevices device, const int port_number);
|
||||||
|
|
Loading…
Reference in New Issue