From b95af2e6f0040c75eccae95f4964880d72a5a8ce Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 7 Nov 2024 21:55:30 -0600 Subject: [PATCH] namespace fixup --- .../ControllerInterface/GCAdapter/GCAdapter.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/Core/InputCommon/ControllerInterface/GCAdapter/GCAdapter.cpp b/Source/Core/InputCommon/ControllerInterface/GCAdapter/GCAdapter.cpp index d223beb5e1..8d66e61892 100644 --- a/Source/Core/InputCommon/ControllerInterface/GCAdapter/GCAdapter.cpp +++ b/Source/Core/InputCommon/ControllerInterface/GCAdapter/GCAdapter.cpp @@ -10,10 +10,9 @@ #include "InputCommon/GCAdapter.h" #include "InputCommon/GCPadStatus.h" -// TODO: name? +// TODO: namespace name matching the one in InputCommon/GCAdapter.h is annoying namespace ciface::GCAdapter { -// TODO: name? constexpr auto SOURCE_NAME = "GCAdapter"; class GCController; @@ -150,7 +149,7 @@ public: m_last_state = new_state; - GCAdapter::Output(m_index, new_state); + ::GCAdapter::Output(m_index, new_state); } std::string GetName() const override { return "Motor"; } @@ -170,7 +169,7 @@ public: AddInput(new DigitalInput{&m_pad_status.button, i}); // TODO: use origin values. - const auto origin = GCAdapter::GetOrigin(index); + const auto origin = ::GCAdapter::GetOrigin(index); // Add sticks. for (auto& props : stick_inputs) @@ -204,7 +203,7 @@ public: Core::DeviceRemoval UpdateInput() override { - m_pad_status = GCAdapter::PeekInput(m_index); + m_pad_status = ::GCAdapter::PeekInput(m_index); return Core::DeviceRemoval::Keep; } @@ -216,14 +215,14 @@ private: InputBackend::InputBackend(ControllerInterface* controller_interface) : ciface::InputBackend(controller_interface) { - GCAdapter::Init(); + ::GCAdapter::Init(); } void InputBackend::PopulateDevices() { for (int i = 0; i != SerialInterface::MAX_SI_CHANNELS; ++i) { - if (GCAdapter::DeviceConnected(i)) + if (::GCAdapter::DeviceConnected(i)) { auto new_device = std::make_shared(i); m_devices[i] = new_device; @@ -237,7 +236,7 @@ void InputBackend::UpdateInput(std::vector>& // "Hotplug" is handled here. for (int i = 0; i != SerialInterface::MAX_SI_CHANNELS; ++i) { - const bool is_device_connected = GCAdapter::DeviceConnected(i); + const bool is_device_connected = ::GCAdapter::DeviceConnected(i); const auto device = m_devices[i].lock(); if (is_device_connected == (device != nullptr))