diff --git a/MiniEngine_Event.cpp b/MiniEngine_Event.cpp index d129e87..16b8e29 100644 --- a/MiniEngine_Event.cpp +++ b/MiniEngine_Event.cpp @@ -1 +1,21 @@ #include "MiniEngine_Event.h" + +int PollEvent(Event& refEvent) +{ + return SDL_PollEvent(&refEvent); +} + +int WaitEvent(Event& refEvent) +{ + return SDL_WaitEvent(&refEvent); +} + +int WaitEventTimeout(Event& refEvent,int ms) +{ + return SDL_WaitEventTimeout(&refEvent,ms); +} + +int PushEvent(const Event& refEvent) +{ + return SDL_PushEvent(const_cast(&refEvent)); +} diff --git a/MiniEngine_Event.h b/MiniEngine_Event.h index 54ae487..8c92434 100644 --- a/MiniEngine_Event.h +++ b/MiniEngine_Event.h @@ -1,2 +1,9 @@ #pragma once #include "MiniEngine.h" + +typedef SDL_Event Event; + +int PollEvent(Event& refEvent); +int WaitEvent(Event& refEvent); +int WaitEventTimeout(Event& refEvent,int ms); +int PushEvent(const Event& refEvent);