diff options
Diffstat (limited to 'src/common/input.h')
| -rw-r--r-- | src/common/input.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/common/input.h b/src/common/input.h index 825b0d650..cb30b7254 100644 --- a/src/common/input.h +++ b/src/common/input.h | |||
| @@ -76,6 +76,19 @@ enum class PollingError { | |||
| 76 | Unknown, | 76 | Unknown, |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | // Nfc reply from the controller | ||
| 80 | enum class NfcState { | ||
| 81 | Success, | ||
| 82 | NewAmiibo, | ||
| 83 | WaitingForAmiibo, | ||
| 84 | AmiiboRemoved, | ||
| 85 | NotAnAmiibo, | ||
| 86 | NotSupported, | ||
| 87 | WrongDeviceState, | ||
| 88 | WriteFailed, | ||
| 89 | Unknown, | ||
| 90 | }; | ||
| 91 | |||
| 79 | // Ir camera reply from the controller | 92 | // Ir camera reply from the controller |
| 80 | enum class CameraError { | 93 | enum class CameraError { |
| 81 | None, | 94 | None, |
| @@ -87,7 +100,6 @@ enum class CameraError { | |||
| 87 | enum class VibrationAmplificationType { | 100 | enum class VibrationAmplificationType { |
| 88 | Linear, | 101 | Linear, |
| 89 | Exponential, | 102 | Exponential, |
| 90 | Test, | ||
| 91 | }; | 103 | }; |
| 92 | 104 | ||
| 93 | // Analog properties for calibration | 105 | // Analog properties for calibration |
| @@ -202,6 +214,11 @@ struct CameraStatus { | |||
| 202 | std::vector<u8> data{}; | 214 | std::vector<u8> data{}; |
| 203 | }; | 215 | }; |
| 204 | 216 | ||
| 217 | struct NfcStatus { | ||
| 218 | NfcState state{}; | ||
| 219 | std::vector<u8> data{}; | ||
| 220 | }; | ||
| 221 | |||
| 205 | // List of buttons to be passed to Qt that can be translated | 222 | // List of buttons to be passed to Qt that can be translated |
| 206 | enum class ButtonNames { | 223 | enum class ButtonNames { |
| 207 | Undefined, | 224 | Undefined, |
| @@ -259,7 +276,9 @@ struct CallbackStatus { | |||
| 259 | BodyColorStatus color_status{}; | 276 | BodyColorStatus color_status{}; |
| 260 | BatteryStatus battery_status{}; | 277 | BatteryStatus battery_status{}; |
| 261 | VibrationStatus vibration_status{}; | 278 | VibrationStatus vibration_status{}; |
| 262 | CameraStatus camera_status{}; | 279 | CameraFormat camera_status{CameraFormat::None}; |
| 280 | NfcState nfc_status{NfcState::Unknown}; | ||
| 281 | std::vector<u8> raw_data{}; | ||
| 263 | }; | 282 | }; |
| 264 | 283 | ||
| 265 | // Triggered once every input change | 284 | // Triggered once every input change |
| @@ -305,6 +324,10 @@ public: | |||
| 305 | return VibrationError::NotSupported; | 324 | return VibrationError::NotSupported; |
| 306 | } | 325 | } |
| 307 | 326 | ||
| 327 | virtual bool IsVibrationEnabled() { | ||
| 328 | return false; | ||
| 329 | } | ||
| 330 | |||
| 308 | virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) { | 331 | virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) { |
| 309 | return PollingError::NotSupported; | 332 | return PollingError::NotSupported; |
| 310 | } | 333 | } |
| @@ -312,6 +335,14 @@ public: | |||
| 312 | virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) { | 335 | virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) { |
| 313 | return CameraError::NotSupported; | 336 | return CameraError::NotSupported; |
| 314 | } | 337 | } |
| 338 | |||
| 339 | virtual NfcState SupportsNfc() const { | ||
| 340 | return NfcState::NotSupported; | ||
| 341 | } | ||
| 342 | |||
| 343 | virtual NfcState WriteNfcData([[maybe_unused]] const std::vector<u8>& data) { | ||
| 344 | return NfcState::NotSupported; | ||
| 345 | } | ||
| 315 | }; | 346 | }; |
| 316 | 347 | ||
| 317 | /// An abstract class template for a factory that can create input devices. | 348 | /// An abstract class template for a factory that can create input devices. |