mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-17 12:58:55 +02:00
InputCommon: Make InputDetector::Start take a span instead of a vector.
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
#include "DolphinQt/Config/Mapping/IOWindow.h"
|
||||
|
||||
#include <array>
|
||||
#include <optional>
|
||||
|
||||
#include <QBrush>
|
||||
@ -532,7 +533,7 @@ void IOWindow::ConnectWidgets()
|
||||
m_detect_button->setText(tr("[ Press Now ]"));
|
||||
m_input_detector = std::make_unique<ciface::Core::InputDetector>();
|
||||
const auto lock = m_controller->GetStateLock();
|
||||
m_input_detector->Start(g_controller_interface, {m_devq.ToString()});
|
||||
m_input_detector->Start(g_controller_interface, std::array{m_devq.ToString()});
|
||||
QtUtils::InstallKeyboardBlocker(m_detect_button, this, &IOWindow::DetectInputComplete);
|
||||
});
|
||||
connect(this, &IOWindow::DetectInputComplete,
|
||||
|
@ -391,7 +391,7 @@ InputDetector::InputDetector() : m_start_time{}, m_state{}
|
||||
}
|
||||
|
||||
void InputDetector::Start(const DeviceContainer& container,
|
||||
const std::vector<std::string>& device_strings)
|
||||
std::span<const std::string> device_strings)
|
||||
|
||||
{
|
||||
m_start_time = Clock::now();
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
@ -255,7 +256,7 @@ public:
|
||||
InputDetector();
|
||||
~InputDetector();
|
||||
|
||||
void Start(const DeviceContainer& container, const std::vector<std::string>& device_strings);
|
||||
void Start(const DeviceContainer& container, std::span<const std::string> device_strings);
|
||||
void Update(std::chrono::milliseconds initial_wait, std::chrono::milliseconds confirmation_wait,
|
||||
std::chrono::milliseconds maximum_wait);
|
||||
bool IsComplete() const;
|
||||
|
Reference in New Issue
Block a user