mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 22:50:04 +00:00
remove std::tie in sdl_impl
This commit is contained in:
parent
2b46b838f1
commit
ca77be3ac2
@ -328,9 +328,7 @@ public:
|
|||||||
: joystick(std::move(joystick_)), axis_x(axis_x_), axis_y(axis_y_), deadzone(deadzone_) {}
|
: joystick(std::move(joystick_)), axis_x(axis_x_), axis_y(axis_y_), deadzone(deadzone_) {}
|
||||||
|
|
||||||
std::tuple<float, float> GetStatus() const override {
|
std::tuple<float, float> GetStatus() const override {
|
||||||
float x;
|
const auto [x, y] = joystick->GetAnalog(axis_x, axis_y);
|
||||||
float y;
|
|
||||||
std::tie(x, y) = joystick->GetAnalog(axis_x, axis_y);
|
|
||||||
const float r = std::sqrt((x * x) + (y * y));
|
const float r = std::sqrt((x * x) + (y * y));
|
||||||
if (r > deadzone) {
|
if (r > deadzone) {
|
||||||
return std::make_tuple(x / r * (r - deadzone) / (1 - deadzone),
|
return std::make_tuple(x / r * (r - deadzone) / (1 - deadzone),
|
||||||
|
Loading…
Reference in New Issue
Block a user