migrant input: guarda el path del mando per a poder distingir mandos amb el mateix nom
This commit is contained in:
@@ -92,12 +92,14 @@ class Input {
|
||||
SDL_Gamepad *pad;
|
||||
SDL_JoystickID instance_id;
|
||||
std::string name;
|
||||
std::string path;
|
||||
std::unordered_map<Action, ButtonState> bindings;
|
||||
|
||||
Gamepad(SDL_Gamepad *gamepad)
|
||||
: pad(gamepad),
|
||||
instance_id(SDL_GetJoystickID(SDL_GetGamepadJoystick(gamepad))),
|
||||
name(std::string(SDL_GetGamepadName(gamepad))),
|
||||
path(std::string(SDL_GetGamepadPath(pad))),
|
||||
bindings{
|
||||
// Movimiento del jugador
|
||||
{Action::UP, ButtonState(SDL_GAMEPAD_BUTTON_DPAD_UP)},
|
||||
|
||||
Reference in New Issue
Block a user