#include "global_events.h" #include // Para SDL_LogInfo, SDL_LogCategory #include "mouse.h" // Para handleEvent #include "section.h" // Para Name, Options, name, options #include "screen.h" namespace GlobalEvents { // Comprueba los eventos que se pueden producir en cualquier sección del juego void check(const SDL_Event &event) { switch (event.type) { case SDL_EVENT_QUIT: // Evento de salida de la aplicación Section::name = Section::Name::QUIT; Section::options = Section::Options::NONE; return; case SDL_EVENT_RENDER_DEVICE_RESET: case SDL_EVENT_RENDER_TARGETS_RESET: SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "SDL_RENDER_TARGETS_RESET"); break; case SDL_EVENT_WINDOW_RESIZED: Screen::get()->initShaders(); break; default: break; } Mouse::handleEvent(event); } }