22 mControlDeck = std::move(controlDeck);
28 ControllerGyro(uint8_t portIndex, std::shared_ptr<ConsoleVariable> consoleVariable =
nullptr,
29 std::shared_ptr<ControlDeck> controlDeck =
nullptr);
73 std::shared_ptr<ControllerGyroMapping> mGyroMapping;
74 std::shared_ptr<ConsoleVariable> mConsoleVariable;
75 std::shared_ptr<ControlDeck> mControlDeck;
Manages the single gyroscope (motion sensor) mapping for a controller port.
Definition ControllerGyro.h:18
void UpdatePad(float &x, float &y)
Reads gyroscope data from the active mapping and writes it to x and y.
void ReloadGyroMappingFromConfig()
Clears any in-memory mapping and reloads it from Config.
void SetControlDeck(std::shared_ptr< ControlDeck > controlDeck)
Injects the owning ControlDeck.
Definition ControllerGyro.h:21
bool SetGyroMappingFromRawPress()
Listens for the next raw gyro input and creates a mapping from it.
std::shared_ptr< ControllerGyroMapping > GetGyroMapping()
Returns the current gyro mapping, or nullptr if none is assigned.
void SaveGyroMappingIdToConfig()
Writes the current gyro mapping ID to Config.
bool HasMappingForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType)
Returns true if the current gyro mapping targets the given device type.
void SetGyroMapping(std::shared_ptr< ControllerGyroMapping > mapping)
Sets the active gyro mapping, replacing any previously set one.
void ClearGyroMapping()
Removes the in-memory gyro mapping (does not touch Config).
ControllerGyro(uint8_t portIndex, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr, std::shared_ptr< ControlDeck > controlDeck=nullptr)
Constructs a ControllerGyro for the given port.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
PhysicalDeviceType
Identifies the category of a physical input device.
Definition PhysicalDeviceType.h:11