mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
[SI] add a way to check if the current controller is a gcpad
(or gcpad-compatible)
This commit is contained in:
@ -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);
|
||||||
|
Reference in New Issue
Block a user