mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-10 11:37:43 +01:00
InputCommon: Use Clock from CommonTypes.
This commit is contained in:
parent
65726b7b5f
commit
e217d6c939
@ -170,7 +170,7 @@ public:
|
|||||||
// Ignore the mouse-click that queued this new detection and finalize the current mapping.
|
// Ignore the mouse-click that queued this new detection and finalize the current mapping.
|
||||||
auto results = m_input_detector->TakeResults();
|
auto results = m_input_detector->TakeResults();
|
||||||
ciface::MappingCommon::RemoveDetectionsAfterTimePoint(
|
ciface::MappingCommon::RemoveDetectionsAfterTimePoint(
|
||||||
&results, ciface::Core::DeviceContainer::Clock::now() - INPUT_DETECT_ENDING_IGNORE_TIME);
|
&results, Clock::now() - INPUT_DETECT_ENDING_IGNORE_TIME);
|
||||||
FinalizeMapping(&results);
|
FinalizeMapping(&results);
|
||||||
}
|
}
|
||||||
UpdateInputDetectionStartTimer();
|
UpdateInputDetectionStartTimer();
|
||||||
|
@ -210,8 +210,6 @@ public:
|
|||||||
class DeviceContainer
|
class DeviceContainer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Clock = std::chrono::steady_clock;
|
|
||||||
|
|
||||||
struct InputDetection
|
struct InputDetection
|
||||||
{
|
{
|
||||||
std::shared_ptr<Device> device;
|
std::shared_ptr<Device> device;
|
||||||
|
@ -147,8 +147,7 @@ void RemoveSpuriousTriggerCombinations(Core::InputDetector::Results* detections)
|
|||||||
std::erase_if(*detections, is_spurious);
|
std::erase_if(*detections, is_spurious);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveDetectionsAfterTimePoint(Core::InputDetector::Results* results,
|
void RemoveDetectionsAfterTimePoint(Core::InputDetector::Results* results, Clock::time_point after)
|
||||||
Core::DeviceContainer::Clock::time_point after)
|
|
||||||
{
|
{
|
||||||
const auto is_after_time = [&](const Core::InputDetector::Detection& detection) {
|
const auto is_after_time = [&](const Core::InputDetector::Detection& detection) {
|
||||||
return detection.release_time.value_or(after) >= after;
|
return detection.release_time.value_or(after) >= after;
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "InputCommon/ControllerInterface/CoreDevice.h"
|
#include "InputCommon/ControllerInterface/CoreDevice.h"
|
||||||
|
|
||||||
@ -25,8 +24,7 @@ std::string BuildExpression(const Core::InputDetector::Results&,
|
|||||||
const Core::DeviceQualifier& default_device, Quote quote);
|
const Core::DeviceQualifier& default_device, Quote quote);
|
||||||
|
|
||||||
void RemoveSpuriousTriggerCombinations(Core::InputDetector::Results*);
|
void RemoveSpuriousTriggerCombinations(Core::InputDetector::Results*);
|
||||||
void RemoveDetectionsAfterTimePoint(Core::InputDetector::Results*,
|
void RemoveDetectionsAfterTimePoint(Core::InputDetector::Results*, Clock::time_point after);
|
||||||
Core::DeviceContainer::Clock::time_point after);
|
|
||||||
bool ContainsCompleteDetection(const Core::InputDetector::Results&);
|
bool ContainsCompleteDetection(const Core::InputDetector::Results&);
|
||||||
|
|
||||||
} // namespace ciface::MappingCommon
|
} // namespace ciface::MappingCommon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user