diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-07-24 19:31:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 19:31:28 +0200 |
commit | 5af06d14337a61d9ed1093079d13f68cbb1f5451 (patch) | |
tree | 88df3fada076b04c2ab2da8972d1d785f492b520 /src/common | |
parent | Merge pull request #8545 from Kelebek1/Audio (diff) | |
parent | yuzu: Add webcam support and rebase to latest master (diff) | |
download | yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.gz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.bz2 yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.lz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.xz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.zst yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/input.h | 29 | ||||
-rw-r--r-- | src/common/settings.h | 3 |
2 files changed, 31 insertions, 1 deletions
diff --git a/src/common/input.h b/src/common/input.h index bb42aaacc..995c35d9d 100644 --- a/src/common/input.h +++ b/src/common/input.h @@ -28,7 +28,7 @@ enum class InputType { Color, Vibration, Nfc, - Ir, + IrSensor, }; // Internal battery charge level @@ -53,6 +53,15 @@ enum class PollingMode { IR, }; +enum class CameraFormat { + Size320x240, + Size160x120, + Size80x60, + Size40x30, + Size20x15, + None, +}; + // Vibration reply from the controller enum class VibrationError { None, @@ -68,6 +77,13 @@ enum class PollingError { Unknown, }; +// Ir camera reply from the controller +enum class CameraError { + None, + NotSupported, + Unknown, +}; + // Hint for amplification curve to be used enum class VibrationAmplificationType { Linear, @@ -176,6 +192,12 @@ struct LedStatus { bool led_4{}; }; +// Raw data fom camera +struct CameraStatus { + CameraFormat format{CameraFormat::None}; + std::vector<u8> data{}; +}; + // List of buttons to be passed to Qt that can be translated enum class ButtonNames { Undefined, @@ -233,6 +255,7 @@ struct CallbackStatus { BodyColorStatus color_status{}; BatteryStatus battery_status{}; VibrationStatus vibration_status{}; + CameraStatus camera_status{}; }; // Triggered once every input change @@ -281,6 +304,10 @@ public: virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) { return PollingError::NotSupported; } + + virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) { + return CameraError::NotSupported; + } }; /// An abstract class template for a factory that can create input devices. diff --git a/src/common/settings.h b/src/common/settings.h index 06d72c8bf..1079cf8cb 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -503,6 +503,9 @@ struct Values { Setting<bool> enable_ring_controller{true, "enable_ring_controller"}; RingconRaw ringcon_analogs; + Setting<bool> enable_ir_sensor{false, "enable_ir_sensor"}; + Setting<std::string> ir_sensor_device{"auto", "ir_sensor_device"}; + // Data Storage Setting<bool> use_virtual_sd{true, "use_virtual_sd"}; Setting<bool> gamecard_inserted{false, "gamecard_inserted"}; |