migrant a SDL3
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GamepadButton, SDL_G...
|
||||
#include <SDL3/SDL_joystick.h> // Para SDL_Joystick
|
||||
#include <SDL3/SDL_scancode.h> // Para SDL_Scancode
|
||||
#include <SDL3/SDL_stdinc.h> // Para Uint8
|
||||
#include <string> // Para string, basic_string
|
||||
#include <vector> // Para vector
|
||||
#include <SDL3/SDL_gamepad.h> // Para SDL_GamepadButton, SDL_Gamepad
|
||||
#include <SDL3/SDL_joystick.h> // Para SDL_Joystick, SDL_JoystickID
|
||||
#include <SDL3/SDL_scancode.h> // Para SDL_Scancode
|
||||
#include <SDL3/SDL_stdinc.h> // Para Uint8
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
/*
|
||||
connectedControllers es un vector donde estan todos los mandos encontrados [0 .. n]
|
||||
@@ -81,8 +81,8 @@ private:
|
||||
struct ControllerBindings
|
||||
{
|
||||
SDL_GamepadButton button; // GameControllerButton asociado
|
||||
bool active; // Indica si está activo
|
||||
bool axis_active; // Estado del eje
|
||||
bool active; // Indica si está activo
|
||||
bool axis_active; // Estado del eje
|
||||
|
||||
// Constructor
|
||||
explicit ControllerBindings(SDL_GamepadButton btn = SDL_GAMEPAD_BUTTON_INVALID, bool act = false, bool axis_act = false)
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
};
|
||||
|
||||
// Variables
|
||||
std::vector<SDL_Gamepad *> connected_controllers_; // Vector con todos los mandos conectados
|
||||
std::vector<SDL_Gamepad *> connected_controllers_; // Vector con todos los mandos conectados
|
||||
std::vector<SDL_Joystick *> joysticks_; // Vector con todos los joysticks conectados
|
||||
std::vector<KeyBindings> key_bindings_; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<std::vector<ControllerBindings>> controller_bindings_; // Vector con los botones asociadas a los inputs predefinidos para cada mando
|
||||
|
||||
Reference in New Issue
Block a user