mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Made error screen and reverted love.event.wait.
This commit is contained in:
@@ -44,8 +44,14 @@ namespace sdl
|
||||
|
||||
int Event::wait(lua_State * L)
|
||||
{
|
||||
lua_pushcclosure(L, &wait_i, 0);
|
||||
return 1;
|
||||
SDL_EnableUNICODE(1);
|
||||
|
||||
// The union used to get SDL events.
|
||||
static SDL_Event e;
|
||||
|
||||
SDL_WaitEvent(&e);
|
||||
|
||||
return Event::pushEvent(L, e);
|
||||
}
|
||||
|
||||
void Event::quit()
|
||||
@@ -82,20 +88,6 @@ namespace sdl
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Event::wait_i(lua_State * L)
|
||||
{
|
||||
SDL_EnableUNICODE(1);
|
||||
|
||||
// The union used to get SDL events.
|
||||
static SDL_Event e;
|
||||
|
||||
SDL_WaitEvent(&e);
|
||||
|
||||
int args = Event::pushEvent(L, e);
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
int Event::pushEvent(lua_State * L, SDL_Event & e)
|
||||
{
|
||||
switch(e.type)
|
||||
|
||||
Reference in New Issue
Block a user