Add Minimum Event Support

This commit is contained in:
Kirigaya Kazuto 2017-05-02 12:59:57 +08:00
parent 8a9d347800
commit 65c8b2e6ef
2 changed files with 27 additions and 0 deletions

View File

@ -1 +1,21 @@
#include "MiniEngine_Event.h" #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<Event*>(&refEvent));
}

View File

@ -1,2 +1,9 @@
#pragma once #pragma once
#include "MiniEngine.h" #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);