summaryrefslogtreecommitdiffstats
path: root/src/input_common/input_engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/input_engine.h')
-rw-r--r--src/input_common/input_engine.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h
index 13295bd49..f6b3c4610 100644
--- a/src/input_common/input_engine.h
+++ b/src/input_common/input_engine.h
@@ -36,11 +36,12 @@ struct BasicMotion {
// Types of input that are stored in the engine
enum class EngineInputType {
None,
+ Analog,
+ Battery,
Button,
+ Camera,
HatButton,
- Analog,
Motion,
- Battery,
};
namespace std {
@@ -115,10 +116,17 @@ public:
// Sets polling mode to a controller
virtual Common::Input::PollingError SetPollingMode(
[[maybe_unused]] const PadIdentifier& identifier,
- [[maybe_unused]] const Common::Input::PollingMode vibration) {
+ [[maybe_unused]] const Common::Input::PollingMode polling_mode) {
return Common::Input::PollingError::NotSupported;
}
+ // Sets camera format to a controller
+ virtual Common::Input::CameraError SetCameraFormat(
+ [[maybe_unused]] const PadIdentifier& identifier,
+ [[maybe_unused]] Common::Input::CameraFormat camera_format) {
+ return Common::Input::CameraError::NotSupported;
+ }
+
// Returns the engine name
[[nodiscard]] const std::string& GetEngineName() const;
@@ -174,6 +182,7 @@ public:
f32 GetAxis(const PadIdentifier& identifier, int axis) const;
Common::Input::BatteryLevel GetBattery(const PadIdentifier& identifier) const;
BasicMotion GetMotion(const PadIdentifier& identifier, int motion) const;
+ Common::Input::CameraStatus GetCamera(const PadIdentifier& identifier) const;
int SetCallback(InputIdentifier input_identifier);
void SetMappingCallback(MappingCallback callback);
@@ -185,6 +194,7 @@ protected:
void SetAxis(const PadIdentifier& identifier, int axis, f32 value);
void SetBattery(const PadIdentifier& identifier, Common::Input::BatteryLevel value);
void SetMotion(const PadIdentifier& identifier, int motion, const BasicMotion& value);
+ void SetCamera(const PadIdentifier& identifier, const Common::Input::CameraStatus& value);
virtual std::string GetHatButtonName([[maybe_unused]] u8 direction_value) const {
return "Unknown";
@@ -197,6 +207,7 @@ private:
std::unordered_map<int, float> axes;
std::unordered_map<int, BasicMotion> motions;
Common::Input::BatteryLevel battery{};
+ Common::Input::CameraStatus camera{};
};
void TriggerOnButtonChange(const PadIdentifier& identifier, int button, bool value);
@@ -205,6 +216,8 @@ private:
void TriggerOnBatteryChange(const PadIdentifier& identifier, Common::Input::BatteryLevel value);
void TriggerOnMotionChange(const PadIdentifier& identifier, int motion,
const BasicMotion& value);
+ void TriggerOnCameraChange(const PadIdentifier& identifier,
+ const Common::Input::CameraStatus& value);
bool IsInputIdentifierEqual(const InputIdentifier& input_identifier,
const PadIdentifier& identifier, EngineInputType type,