forked from jaildesigner-jailgames/jaildoctors_dilemma
Acabat amb els singletones, de moment
Arreglat els checkEvents
This commit is contained in:
@@ -21,7 +21,6 @@ LoadingScreen::LoadingScreen()
|
||||
input_(Input::get())
|
||||
{
|
||||
// Reserva memoria para los punteros
|
||||
eventHandler = new SDL_Event();
|
||||
if (options.palette == p_zxspectrum)
|
||||
{
|
||||
mono_loading_screen_texture_ = resource_->getTexture("loading_screen_bn.png");
|
||||
@@ -70,7 +69,6 @@ LoadingScreen::~LoadingScreen()
|
||||
{
|
||||
delete mono_loading_screen_sprite_;
|
||||
delete color_loading_screen_sprite_;
|
||||
delete eventHandler;
|
||||
JA_DeleteMusic(loading_sound1_);
|
||||
JA_DeleteMusic(loading_sound2_);
|
||||
JA_DeleteMusic(loading_sound3_);
|
||||
@@ -79,11 +77,11 @@ LoadingScreen::~LoadingScreen()
|
||||
// Comprueba el manejador de eventos
|
||||
void LoadingScreen::checkEvents()
|
||||
{
|
||||
// Comprueba los eventos que hay en la cola
|
||||
while (SDL_PollEvent(eventHandler) != 0)
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event))
|
||||
{
|
||||
// Evento de salida de la aplicación
|
||||
if (eventHandler->type == SDL_QUIT)
|
||||
if (event.type == SDL_QUIT)
|
||||
{
|
||||
options.section.name = SECTION_QUIT;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user