|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
Factory for creating ControllerLEDMapping instances. More...
#include <LEDMappingFactory.h>
Static Public Member Functions | |
| static std::shared_ptr< ControllerLEDMapping > | CreateLEDMappingFromConfig (uint8_t portIndex, std::string id, std::shared_ptr< ConsoleVariable > consoleVariable, std::shared_ptr< ControlDeck > controlDeck) |
| Deserializes an LED mapping from the configuration string. | |
| static std::shared_ptr< ControllerLEDMapping > | CreateLEDMappingFromSDLInput (uint8_t portIndex, std::shared_ptr< ConsoleVariable > consoleVariable, std::shared_ptr< ControlDeck > controlDeck) |
| Creates an LED mapping from live SDL input for interactive binding. | |
Factory for creating ControllerLEDMapping instances.
LEDMappingFactory provides static helpers to create ControllerLEDMapping instances that map game controller LED output states to physical controller LED devices. It supports deserializing LED mappings from persisted configuration and creating mappings from live SDL input events during interactive binding.
LED mappings enable visual feedback (e.g., lighting or color changes) on physical controllers in response to in-game events.
All factory methods require a ConsoleVariable and ControlDeck to track state and configuration.
Typical usage (within ControlDeck or ConfigUI):
|
static |
Deserializes an LED mapping from the configuration string.
| portIndex | The controller port index (0-based). |
| id | Configuration string encoding the LED output target. |
| consoleVariable | ConsoleVariable for persisting the mapping. |
| controlDeck | ControlDeck for physical device access. |
|
static |
Creates an LED mapping from live SDL input for interactive binding.
| portIndex | The controller port index (0-based). |
| consoleVariable | ConsoleVariable for persisting the mapping. |
| controlDeck | ControlDeck for physical device access. |