mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:07:45 +00:00
24 lines
382 B
C++
24 lines
382 B
C++
#include "EventLoopSDL.h"
|
|
#include "Event.h"
|
|
#include <SDL.h>
|
|
|
|
EventLoopSDL::EventLoopSDL()
|
|
{
|
|
}
|
|
|
|
EventLoopSDL::~EventLoopSDL()
|
|
{
|
|
}
|
|
|
|
void EventLoopSDL::waitForEvent()
|
|
{
|
|
SDL_Event sdlEvent;
|
|
while (SDL_WaitEvent(&sdlEvent) != 0) {
|
|
switch (sdlEvent.type) {
|
|
case SDL_QUIT:
|
|
postEvent(nullptr, make<QuitEvent>());
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|