Moved the Lua wrapper code for love.event out of the sdl implementation folder.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-03-01 02:55:50 -04:00
parent a8276105c7
commit c572b1af19
5 changed files with 18 additions and 24 deletions
+1
View File
@@ -70,6 +70,7 @@ public:
virtual void clear();
virtual void pump() = 0;
virtual Message *wait() = 0;
protected:
thread::Mutex *mutex;
@@ -23,15 +23,12 @@
// LOVE
#include "common/runtime.h"
// sdlevent
#include "Event.h"
#include "sdl/Event.h"
namespace love
{
namespace event
{
namespace sdl
{
#define instance() (Module::getInstance<Event>(Module::M_EVENT))
@@ -124,7 +121,7 @@ extern "C" int luaopen_love_event(lua_State *L)
Event *instance = instance();
if (instance == nullptr)
{
luax_catchexcept(L, [&](){ instance = new Event(); });
luax_catchexcept(L, [&](){ instance = new love::event::sdl::Event(); });
}
else
instance->retain();
@@ -139,6 +136,5 @@ extern "C" int luaopen_love_event(lua_State *L)
return luax_register_module(L, w);
}
} // sdl
} // event
} // love
@@ -18,8 +18,8 @@
* 3. This notice may not be removed or altered from any source distribution.
**/
#ifndef LOVE_EVENT_SDL_WRAP_EVENT_H
#define LOVE_EVENT_SDL_WRAP_EVENT_H
#ifndef LOVE_EVENT_WRAP_EVENT_H
#define LOVE_EVENT_WRAP_EVENT_H
// LOVE
#include "common/config.h"
@@ -29,8 +29,6 @@ namespace love
{
namespace event
{
namespace sdl
{
int w_pump(lua_State *L);
int w_poll(lua_State *L);
@@ -41,8 +39,7 @@ int w_quit(lua_State *L);
extern "C" LOVE_EXPORT int luaopen_love_event(lua_State *L);
} // sdl
} // event
} // love
#endif // LOVE_EVENT_SDL_WRAP_EVENT_H
#endif // LOVE_EVENT_WRAP_EVENT_H