mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 22:30:14 +00:00
Fix travis build
This commit is contained in:
parent
d56c75e61b
commit
6d9a4eccf5
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <cmath>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
@ -177,7 +178,7 @@ void InputCore::BuildKeyMapping() {
|
|||||||
for (size_t i = 0; i < Settings::values.input_mappings.size(); i++) {
|
for (size_t i = 0; i < Settings::values.input_mappings.size(); i++) {
|
||||||
auto val = KeyMap::mapping_targets[i];
|
auto val = KeyMap::mapping_targets[i];
|
||||||
auto key = Settings::values.input_mappings[i];
|
auto key = Settings::values.input_mappings[i];
|
||||||
key_mappings.try_emplace(key, std::vector<Service::HID::PadState>());
|
key_mappings.emplace(key, std::vector<Service::HID::PadState>());
|
||||||
key_mappings[key].push_back(val);
|
key_mappings[key].push_back(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,7 +220,7 @@ void InputCore::ParseSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<float, float> InputCore::ApplyDeadzone(float x, float y, float dead_zone) {
|
std::tuple<float, float> InputCore::ApplyDeadzone(float x, float y, float dead_zone) {
|
||||||
float magnitude = sqrt((x * x) + (y * y));
|
float magnitude = std::sqrt((x * x) + (y * y));
|
||||||
if (magnitude < dead_zone) {
|
if (magnitude < dead_zone) {
|
||||||
x = 0;
|
x = 0;
|
||||||
y = 0;
|
y = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user