diff options
| author | 2020-09-04 21:48:03 -0500 | |
|---|---|---|
| committer | 2020-09-04 21:48:03 -0500 | |
| commit | ff679f3d171ace12d1b3b68f305b1bb24b2130de (patch) | |
| tree | 67cd6da1b1ef1e7b817ffd82cc8606ace6da779e /src/core/frontend/input.h | |
| parent | Merge pull request #4629 from Morph1984/mergesinglejoyasdualjoy-impl (diff) | |
| download | yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.gz yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.xz yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.zip | |
Include HID and configuration changes related to motion
Diffstat (limited to 'src/core/frontend/input.h')
| -rw-r--r-- | src/core/frontend/input.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index 2b098b7c6..6770475cf 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h | |||
| @@ -137,6 +137,33 @@ using AnalogDevice = InputDevice<std::tuple<float, float>>; | |||
| 137 | using MotionDevice = InputDevice<std::tuple<Common::Vec3<float>, Common::Vec3<float>>>; | 137 | using MotionDevice = InputDevice<std::tuple<Common::Vec3<float>, Common::Vec3<float>>>; |
| 138 | 138 | ||
| 139 | /** | 139 | /** |
| 140 | * A real motion device is an input device that returns a tuple of accelerometer state vector, | ||
| 141 | * gyroscope state vector, rotation state vector and orientation state matrix. | ||
| 142 | * | ||
| 143 | * For both vectors: | ||
| 144 | * x+ is the same direction as RIGHT on D-pad. | ||
| 145 | * y+ is normal to the touch screen, pointing outward. | ||
| 146 | * z+ is the same direction as UP on D-pad. | ||
| 147 | * | ||
| 148 | * For accelerometer state vector | ||
| 149 | * Units: g (gravitational acceleration) | ||
| 150 | * | ||
| 151 | * For gyroscope state vector: | ||
| 152 | * Orientation is determined by right-hand rule. | ||
| 153 | * Units: deg/sec | ||
| 154 | * | ||
| 155 | * For rotation state vector | ||
| 156 | * Units: rotations | ||
| 157 | * | ||
| 158 | * For orientation state matrix | ||
| 159 | * x vector | ||
| 160 | * y vector | ||
| 161 | * z vector | ||
| 162 | */ | ||
| 163 | using RealMotionDevice = InputDevice<std::tuple<Common::Vec3<float>, Common::Vec3<float>, | ||
| 164 | Common::Vec3<float>, std::array<Common::Vec3f, 3>>>; | ||
| 165 | |||
| 166 | /** | ||
| 140 | * A touch device is an input device that returns a tuple of two floats and a bool. The floats are | 167 | * A touch device is an input device that returns a tuple of two floats and a bool. The floats are |
| 141 | * x and y coordinates in the range 0.0 - 1.0, and the bool indicates whether it is pressed. | 168 | * x and y coordinates in the range 0.0 - 1.0, and the bool indicates whether it is pressed. |
| 142 | */ | 169 | */ |