3#include <unordered_map>
4#include <unordered_set>
86 std::unordered_map<int32_t, SDL_GameController*> mConnectedSDLGamepads;
87 std::unordered_map<int32_t, std::string> mConnectedSDLGamepadNames;
88 std::unordered_map<uint8_t, std::unordered_set<int32_t>> mIgnoredInstanceIds;
Tracks connected SDL game controllers and manages per-port ignore lists.
Definition ConnectedPhysicalDeviceManager.h:19
void HandlePhysicalDeviceConnect(int32_t sdlDeviceIndex)
Handles an SDL device-added event by opening the new controller.
void HandlePhysicalDeviceDisconnect(int32_t sdlJoystickInstanceId)
Handles an SDL device-removed event by closing the controller.
std::unordered_set< int32_t > GetIgnoredInstanceIdsForPort(uint8_t portIndex)
Returns the set of SDL joystick instance IDs ignored for a port.
void UnignoreInstanceIdForPort(uint8_t portIndex, int32_t instanceId)
Removes a joystick instance from a port's ignore list.
~ConnectedPhysicalDeviceManager()
std::unordered_map< int32_t, std::string > GetConnectedSDLGamepadNames()
Returns the display names of all connected SDL gamepads.
void RefreshConnectedSDLGamepads()
Re-scans all connected SDL gamepads and rebuilds the internal maps.
ConnectedPhysicalDeviceManager()
Constructs the manager and performs an initial scan of connected gamepads.
void IgnoreInstanceIdForPort(uint8_t portIndex, int32_t instanceId)
Adds a joystick instance to a port's ignore list.
bool PortIsIgnoringInstanceId(uint8_t portIndex, int32_t instanceId)
Checks whether a specific joystick instance is being ignored on a port.
std::unordered_map< int32_t, SDL_GameController * > GetConnectedSDLGamepadsForPort(uint8_t portIndex)
Returns the connected SDL gamepads available for the given port.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14