libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
SDLLEDMapping.h
Go to the documentation of this file.
2#include "SDLMapping.h"
3#include <memory>
4
5namespace Ship {
6class ConsoleVariable;
7class ControlDeck;
8
15class SDLLEDMapping final : public ControllerLEDMapping {
16 public:
23 SDLLEDMapping(uint8_t portIndex, uint8_t colorSource, Color_RGB8 savedColor,
24 std::shared_ptr<ControlDeck> controlDeck = nullptr,
25 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
26
31 void SetLEDColor(Color_RGB8 color) override;
32
34 std::string GetLEDMappingId() override;
35
37 void SaveToConfig() override;
38
40 void EraseFromConfig() override;
41
43 std::string GetPhysicalDeviceName() override;
44
45 protected:
46 std::shared_ptr<ConsoleVariable> mConsoleVariable;
47 std::shared_ptr<ControlDeck> mControlDeck;
48};
49} // namespace Ship
Maps LED colour output to a physical controller.
Definition ControllerLEDMapping.h:21
Maps an SDL gamepad's LED to a controller LED output.
Definition SDLLEDMapping.h:15
std::string GetLEDMappingId() override
Returns the unique string identifier for this mapping.
void EraseFromConfig() override
Removes this mapping from the application configuration.
std::shared_ptr< ControlDeck > mControlDeck
Definition SDLLEDMapping.h:47
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.
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition SDLLEDMapping.h:46
void SaveToConfig() override
Persists this mapping to the application configuration.
void SetLEDColor(Color_RGB8 color) override
Sends an RGB colour to the gamepad LED.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the SDL gamepad device.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
8-bit RGB colour without an alpha channel.
Definition color.h:14