mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 09:57:59 -05:00
input_common: Add property to invert an axis button
This commit is contained in:
@ -111,6 +111,8 @@ struct AnalogProperties {
|
||||
float offset{};
|
||||
// Invert direction of the sensor data
|
||||
bool inverted{};
|
||||
// Invert the state if it's converted to a button
|
||||
bool inverted_button{};
|
||||
// Press once to activate, press again to release
|
||||
bool toggle{};
|
||||
};
|
||||
|
@ -265,7 +265,7 @@ public:
|
||||
z = std::sin(roll) * temp + std::cos(roll) * z;
|
||||
|
||||
temp = x;
|
||||
x = std::cosf(pitch) * x + std::sin(pitch) * z;
|
||||
x = std::cos(pitch) * x + std::sin(pitch) * z;
|
||||
z = -std::sin(pitch) * temp + std::cos(pitch) * z;
|
||||
|
||||
temp = x;
|
||||
|
Reference in New Issue
Block a user