// eventmanager.hpp #include class EventManager { public: void update() { SDL_Event event; while (SDL_PollEvent(&event)) { if (event.type == SDL_EVENT_QUIT || event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED) { if (!quit) { quit = true; SDL_LogInfo( SDL_LOG_CATEGORY_APPLICATION, "Someone wants to quit!"); } } } } auto wantToQuit() -> bool { return quit; } private: bool quit{false}; };