ASAPCabinetFE
 
Loading...
Searching...
No Matches
joystick_manager.h
Go to the documentation of this file.
1
10#ifndef JOYSTICK_MANAGER_H
11#define JOYSTICK_MANAGER_H
12
13#include <SDL2/SDL.h>
14#include <vector>
15
25public:
32
39
45 std::vector<SDL_Joystick*> getJoysticks() const { return joysticks_; }
46
54 void addJoystick(int index);
55
63 void removeJoystick(SDL_JoystickID id);
64
65private:
66 std::vector<SDL_Joystick*> joysticks_;
67
73 void initializeJoysticks();
74
80 void cleanupJoysticks();
81};
82
83#endif // JOYSTICK_MANAGER_H
Manages SDL joystick initialization and lifecycle.
Definition joystick_manager.h:24
std::vector< SDL_Joystick * > getJoysticks() const
Gets the list of active joysticks.
Definition joystick_manager.h:45
~JoystickManager()
Destroys the JoystickManager instance.
Definition joystick_manager.cpp:16
JoystickManager()
Constructs a JoystickManager instance.
Definition joystick_manager.cpp:11
void removeJoystick(SDL_JoystickID id)
Removes a joystick by ID.
Definition joystick_manager.cpp:50
void addJoystick(int index)
Adds a joystick by index.
Definition joystick_manager.cpp:42