corregidos varios bugs

This commit is contained in:
2024-09-11 20:42:21 +02:00
parent 41c3e1f32c
commit a435e3ed8c
7 changed files with 29 additions and 27 deletions

View File

@@ -94,7 +94,6 @@ void Title::update()
if (postFade == -1)
{
section->name = SECTION_PROG_GAME_DEMO;
}
else
{
@@ -215,33 +214,25 @@ void Title::checkEvents()
switch (eventHandler->key.keysym.sym)
{
case SDLK_1:
defineButtons->enable(0);
if (defineButtons->enable(0))
resetCounter();
break;
case SDLK_2:
defineButtons->enable(1);
if (defineButtons->enable(1))
resetCounter();
break;
case SDLK_3:
defineButtons->swapControllers();
screen->showNotification("Swap Controllers");
resetCounter();
break;
default:
break;
}
}
// Comprueba en el primer mando el botón de salir del programa
// else if (eventHandler->type == SDL_CONTROLLERBUTTONDOWN)
//{
// if ((SDL_GameControllerButton)eventHandler->cbutton.which == 0)
// if ((SDL_GameControllerButton)eventHandler->cbutton.button == input->getControllerBinding(0, input_exit))
// {
// section->name = SECTION_PROG_QUIT;
// break;
// }
//}
}
}
}
@@ -273,7 +264,6 @@ void Title::checkInput()
}
}
//////////////////////////////////////////////////
// MANDO //
//////////////////////////////////////////////////
@@ -334,4 +324,10 @@ void Title::reLoadTextures()
{
gameLogo->reLoad();
tiledbg->reLoad();
}
// Reinicia el contador interno
void Title::resetCounter()
{
counter = 0;
}