Added love.event.clear, because why not. (Issue #202).

This commit is contained in:
rude
2011-03-16 23:23:20 +01:00
parent ffa9e205eb
commit 20364c67bd
4 changed files with 23 additions and 0 deletions
+10
View File
@@ -73,6 +73,16 @@ namespace sdl
return ok && (SDL_PushEvent(&e) == 0);
}
void Event::clear()
{
static SDL_Event e;
while(SDL_PollEvent(&e))
{
// Do nothing with 'e' ...
}
}
bool Event::convert(SDL_Event & e, Message & m)
{
switch(e.type)