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