canviat Options de struct a namespace
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "core/input/input.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm> // Para find
|
||||
#include <iostream> // Para basic_ostream, operator<<, cout, endl
|
||||
@@ -119,7 +119,7 @@ bool Input::checkInput(InputAction input, bool repeat, InputDeviceToUse device,
|
||||
// Comprueba si hay almenos un input activo
|
||||
bool Input::checkAnyInput(InputDeviceToUse device, int controller_index) {
|
||||
if (device == InputDeviceToUse::KEYBOARD || device == InputDeviceToUse::ANY) {
|
||||
const bool *key_states = SDL_GetKeyboardState(nullptr);
|
||||
const bool* key_states = SDL_GetKeyboardState(nullptr);
|
||||
|
||||
for (int i = 0; i < (int)key_bindings_.size(); ++i) {
|
||||
if (key_states[key_bindings_[i].scancode] != 0 && !key_bindings_[i].active) {
|
||||
@@ -213,7 +213,6 @@ bool Input::discoverGameControllers() {
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
// Comprueba si hay algun mando conectado
|
||||
bool Input::gameControllerFound() { return num_gamepads_ > 0 ? true : false; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user