Dual input for P1 done
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#define INPUT_USE_KEYBOARD 0
|
||||
#define INPUT_USE_GAMECONTROLLER 1
|
||||
#define INPUT_USE_ANY 2
|
||||
|
||||
// Clase Input
|
||||
class Input
|
||||
@@ -52,14 +53,12 @@ private:
|
||||
std::vector<SDL_GameController*> mConnectedControllers;
|
||||
int mNumGamepads;
|
||||
|
||||
int mSource; // Indica si el objeto usará un mando o un teclado
|
||||
|
||||
// Comprueba si hay un mando conectado
|
||||
bool discoverGameController();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Input(int source);
|
||||
Input();
|
||||
|
||||
// Destructor
|
||||
~Input();
|
||||
@@ -71,10 +70,7 @@ public:
|
||||
void bindGameController(Uint8 input, SDL_GameControllerButton button);
|
||||
|
||||
// Comprueba si un input esta activo
|
||||
bool checkInput(Uint8 input, bool repeat);
|
||||
|
||||
// Establece el método de entrada
|
||||
void setSource(Uint8 value);
|
||||
bool checkInput(Uint8 input, bool repeat, int device=INPUT_USE_ANY);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user