|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
Maps an SDL gamepad's LED to a controller LED output. More...
#include <SDLLEDMapping.h>
Public Member Functions | |
| SDLLEDMapping (uint8_t portIndex, uint8_t colorSource, Color_RGB8 savedColor, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr) | |
| Constructs an SDL LED mapping. | |
| void | SetLEDColor (Color_RGB8 color) override |
| Sends an RGB colour to the gamepad LED. | |
| std::string | GetLEDMappingId () override |
| Returns the unique string identifier for this mapping. | |
| void | SaveToConfig () override |
| Persists this mapping to the application configuration. | |
| void | EraseFromConfig () override |
| Removes this mapping from the application configuration. | |
| std::string | GetPhysicalDeviceName () override |
| Returns the human-readable name of the SDL gamepad device. | |
Public Member Functions inherited from Ship::ControllerLEDMapping | |
| ControllerLEDMapping (PhysicalDeviceType physicalDeviceType, uint8_t portIndex, uint8_t colorSource, Color_RGB8 savedColor) | |
| Constructs a ControllerLEDMapping. | |
| ~ControllerLEDMapping () | |
| void | SetColorSource (uint8_t colorSource) |
| Sets the LED colour source mode. | |
| uint8_t | GetColorSource () |
| Returns the current LED colour source mode. | |
| void | SetSavedColor (Color_RGB8 colorToSave) |
| Saves a colour for later restoration. | |
| Color_RGB8 | GetSavedColor () |
| Returns the previously saved LED colour. | |
| void | SetPortIndex (uint8_t portIndex) |
| Sets the controller port index for this mapping. | |
Public Member Functions inherited from Ship::ControllerMapping | |
| ControllerMapping (PhysicalDeviceType physicalDeviceType) | |
| Constructs a ControllerMapping for the given physical device type. | |
| ~ControllerMapping () | |
| PhysicalDeviceType | GetPhysicalDeviceType () |
| Returns the physical device type for this mapping. | |
Protected Attributes | |
| std::shared_ptr< ConsoleVariable > | mConsoleVariable |
| std::shared_ptr< ControlDeck > | mControlDeck |
Protected Attributes inherited from Ship::ControllerLEDMapping | |
| uint8_t | mPortIndex |
| uint8_t | mColorSource |
| Color_RGB8 | mSavedColor |
Protected Attributes inherited from Ship::ControllerMapping | |
| PhysicalDeviceType | mPhysicalDeviceType |
Maps an SDL gamepad's LED to a controller LED output.
Sets the RGB colour of the gamepad LED either from a fixed saved colour or from a dynamic colour source determined at runtime.
| Ship::SDLLEDMapping::SDLLEDMapping | ( | uint8_t | portIndex, |
| uint8_t | colorSource, | ||
| Color_RGB8 | savedColor, | ||
| std::shared_ptr< ControlDeck > | controlDeck = nullptr, |
||
| std::shared_ptr< ConsoleVariable > | consoleVariable = nullptr |
||
| ) |
Constructs an SDL LED mapping.
| portIndex | The controller port index. |
| colorSource | Identifier for the colour source strategy. |
| savedColor | The saved RGB colour used when the source is fixed. |
|
overridevirtual |
Removes this mapping from the application configuration.
Implements Ship::ControllerLEDMapping.
|
overridevirtual |
Returns the unique string identifier for this mapping.
Implements Ship::ControllerLEDMapping.
|
overridevirtual |
Returns the human-readable name of the SDL gamepad device.
Reimplemented from Ship::ControllerMapping.
|
overridevirtual |
Persists this mapping to the application configuration.
Implements Ship::ControllerLEDMapping.
|
overridevirtual |
Sends an RGB colour to the gamepad LED.
| color | The colour to apply. |
Implements Ship::ControllerLEDMapping.
|
protected |
|
protected |