mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Added love.event.clear, because why not. (Issue #202).
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user