Corregido el orden de ejecución update-checkEvents-render en todas las secciones del juego para evitar que el juego tarde en actualizarse cuando hay muchos eventos
This commit is contained in:
@@ -215,9 +215,6 @@ void Title::init()
|
||||
// Actualiza las variables del objeto
|
||||
void Title::update()
|
||||
{
|
||||
// Comprueba los eventos
|
||||
checkEventHandler();
|
||||
|
||||
// Comprueba las entradas
|
||||
checkInput();
|
||||
|
||||
@@ -670,7 +667,7 @@ void Title::render()
|
||||
}
|
||||
|
||||
// Comprueba los eventos
|
||||
void Title::checkEventHandler()
|
||||
void Title::checkEvents()
|
||||
{
|
||||
// Comprueba los eventos que hay en la cola
|
||||
while (SDL_PollEvent(eventHandler) != 0)
|
||||
@@ -976,6 +973,7 @@ section_t Title::run()
|
||||
while (section.name == PROG_SECTION_TITLE)
|
||||
{
|
||||
update();
|
||||
checkEvents();
|
||||
render();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user