Qt: Add Controller LED options (where supported)

This commit is contained in:
Stenzek
2023-01-15 16:40:35 +10:00
parent 722771fff6
commit c393db419e
15 changed files with 331 additions and 10 deletions

View File

@ -14,6 +14,8 @@ class SettingsInterface;
class SDLInputSource final : public InputSource
{
public:
static constexpr u32 MAX_LED_COLORS = 4;
SDLInputSource();
~SDLInputSource();
@ -38,6 +40,9 @@ public:
SDL_Joystick* GetJoystickForDevice(const std::string_view& device);
static u32 GetRGBForPlayerId(SettingsInterface& si, u32 player_id);
static u32 ParseRGBForPlayerId(const std::string_view& str, u32 player_id);
private:
struct ControllerData
{
@ -82,5 +87,6 @@ private:
bool m_sdl_subsystem_initialized = false;
bool m_controller_enhanced_mode = false;
std::array<u32, MAX_LED_COLORS> m_led_colors{};
std::vector<std::pair<std::string, std::string>> m_sdl_hints;
};