input: Añadidos más inputs por defecto

This commit is contained in:
2023-05-23 20:07:29 +02:00
parent 92aae07fd1
commit 71a81755d0

View File

@@ -243,7 +243,7 @@ bool Input::discoverGameController()
// name = name + separator + to_string(i);
if (verbose)
{
cout << " -" << name << endl;
cout << " - " << name << endl;
}
controllerNames.push_back(name);
}
@@ -322,14 +322,21 @@ void Input::setDefaultBindings()
bindKey(INPUT_DOWN, SDL_SCANCODE_DOWN);
bindKey(INPUT_LEFT, SDL_SCANCODE_LEFT);
bindKey(INPUT_RIGHT, SDL_SCANCODE_RIGHT);
bindKey(INPUT_EXIT, SDL_SCANCODE_ESCAPE);
bindKey(INPUT_BUTTON_1, SDL_SCANCODE_Z);
bindKey(INPUT_BUTTON_2, SDL_SCANCODE_X);
bindKey(INPUT_ACCEPT, SDL_SCANCODE_RETURN);
bindKey(INPUT_CANCEL, SDL_SCANCODE_ESCAPE);
bindKey(INPUT_PAUSE, SDL_SCANCODE_H);
bindKey(INPUT_EXIT, SDL_SCANCODE_ESCAPE);
// Mando
bindGameControllerButton(INPUT_UP, SDL_CONTROLLER_BUTTON_DPAD_UP);
bindGameControllerButton(INPUT_DOWN, SDL_CONTROLLER_BUTTON_DPAD_DOWN);
bindGameControllerButton(INPUT_LEFT, SDL_CONTROLLER_BUTTON_DPAD_LEFT);
bindGameControllerButton(INPUT_RIGHT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT);
bindGameControllerButton(INPUT_BUTTON_1, SDL_CONTROLLER_BUTTON_A);
bindGameControllerButton(INPUT_BUTTON_2, SDL_CONTROLLER_BUTTON_B);
bindGameControllerButton(INPUT_BUTTON_3, SDL_CONTROLLER_BUTTON_X);
@@ -338,4 +345,9 @@ void Input::setDefaultBindings()
bindGameControllerButton(INPUT_BUTTON_6, SDL_CONTROLLER_BUTTON_START);
bindGameControllerButton(INPUT_BUTTON_7, SDL_CONTROLLER_BUTTON_LEFTSHOULDER);
bindGameControllerButton(INPUT_BUTTON_8, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER);
bindGameControllerButton(INPUT_ACCEPT, SDL_CONTROLLER_BUTTON_A);
bindGameControllerButton(INPUT_CANCEL, SDL_CONTROLLER_BUTTON_B);
bindGameControllerButton(INPUT_PAUSE, SDL_CONTROLLER_BUTTON_START);
bindGameControllerButton(INPUT_EXIT, SDL_CONTROLLER_BUTTON_BACK);
}