citra-emu
/
citra-canary
Archived
1
0
Fork 0

remove std::tie in sdl_impl

This commit is contained in:
B3n30 2018-10-09 22:44:26 +02:00
parent 2b46b838f1
commit ca77be3ac2
1 changed files with 1 additions and 3 deletions

View File

@ -328,9 +328,7 @@ public:
: joystick(std::move(joystick_)), axis_x(axis_x_), axis_y(axis_y_), deadzone(deadzone_) {}
std::tuple<float, float> GetStatus() const override {
float x;
float y;
std::tie(x, y) = joystick->GetAnalog(axis_x, axis_y);
const auto [x, y] = joystick->GetAnalog(axis_x, axis_y);
const float r = std::sqrt((x * x) + (y * y));
if (r > deadzone) {
return std::make_tuple(x / r * (r - deadzone) / (1 - deadzone),