Start to work on dual input for P1

This commit is contained in:
2021-08-29 19:54:18 +02:00
parent 4de3d69bb8
commit 02b528ea8c
12 changed files with 110 additions and 48 deletions

View File

@@ -42,6 +42,8 @@ Director::Director(std::string path)
// Crea los objetos
mInput1 = new Input(mOptions->player1Input);
mInput2 = new Input(mOptions->player2Input);
//mInput[0] = new Input(INPUT_USE_KEYBOARD);
//mInput[1] = new Input(INPUT_USE_GAMECONTROLLER);
// Inicializa SDL
initSDL();
@@ -140,12 +142,11 @@ void Director::initJailAudio()
// Arranca SDL y crea la ventana
bool Director::initSDL()
{
// Indicador de inicialización
// Indicador de éxito
bool success = true;
// Inicializa SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO | SDL_INIT_HAPTIC) < 0)
//if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0)
{
printf("SDL could not initialize!\nSDL Error: %s\n", SDL_GetError());
success = false;