summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/GCAdapter_Android.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-03-16 04:41:36 -0400
committerLioncash <mathew1800@gmail.com>2017-03-16 04:41:39 -0400
commitf0eeb3c63ac49b9f4b9dd837038b00caeefdcb01 (patch)
tree0730ec9524f0b3f62deb253b907e3aefb759ab20 /Source/Core/InputCommon/GCAdapter_Android.cpp
parent2cead402b3186731c8e4de9d64af200f59010567 (diff)
SI: Namespace device classes
Places all of the SI code under the SerialInterface namespace instead of only the main source file. This keeps all SI code under a common name, as well as out of the global namespace
Diffstat (limited to 'Source/Core/InputCommon/GCAdapter_Android.cpp')
-rw-r--r--Source/Core/InputCommon/GCAdapter_Android.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/GCAdapter_Android.cpp b/Source/Core/InputCommon/GCAdapter_Android.cpp
index d8d40fb659..7b0c6e1545 100644
--- a/Source/Core/InputCommon/GCAdapter_Android.cpp
+++ b/Source/Core/InputCommon/GCAdapter_Android.cpp
@@ -385,10 +385,11 @@ bool DeviceConnected(int chan)
bool UseAdapter()
{
- return SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_WIIU_ADAPTER ||
- SConfig::GetInstance().m_SIDevice[1] == SIDEVICE_WIIU_ADAPTER ||
- SConfig::GetInstance().m_SIDevice[2] == SIDEVICE_WIIU_ADAPTER ||
- SConfig::GetInstance().m_SIDevice[3] == SIDEVICE_WIIU_ADAPTER;
+ const auto& si_devices = SConfig::GetInstance().m_SIDevice;
+
+ return std::any_of(std::begin(si_devices), std::end(si_devices), [](const auto device_type) {
+ return device_type == SerialInterface::SIDEVICE_WIIU_ADAPTER;
+ });
}
void ResetRumble()