diff options
| author | 2016-02-26 14:50:09 +0100 | |
|---|---|---|
| committer | 2016-02-26 14:50:09 +0100 | |
| commit | 3a811376d974de519c4ef74dff3e5b8719468f4a (patch) | |
| tree | 400d7f2d10829e50c548854c3c93ec637d33768f /src/emu/luaengine.cpp | |
| parent | 2582ce7f16cc84c686a4357fca7d53edd0ecc348 (diff) | |
Made pnacl to compile (nw)
Diffstat (limited to 'src/emu/luaengine.cpp')
| -rw-r--r-- | src/emu/luaengine.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index 32eccb8a85b..061305b3d9f 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -19,7 +19,9 @@ #include "ui/ui.h" #include "luaengine.h" #include <mutex> +#if !defined(NO_LIBUV) #include "libuv/include/uv.h" +#endif //************************************************************************** // LUA ENGINE @@ -49,9 +51,11 @@ lua_engine* lua_engine::luaThis = nullptr; extern "C" { int luaopen_lsqlite3(lua_State *L); int luaopen_zlib(lua_State *L); - int luaopen_luv(lua_State *L); int luaopen_lfs(lua_State *L); +#if !defined(NO_LIBUV) + int luaopen_luv(lua_State *L); uv_loop_t* luv_loop(lua_State* L); +#endif } static void lstop(lua_State *L, lua_Debug *ar) @@ -1195,9 +1199,11 @@ lua_engine::lua_engine() lua_getfield(m_lua_state, -1, "preload"); lua_remove(m_lua_state, -2); // Remove package +#if !defined(NO_LIBUV) // Store uv module definition at preload.uv lua_pushcfunction(m_lua_state, luaopen_luv); lua_setfield(m_lua_state, -2, "luv"); +#endif lua_pushcfunction(m_lua_state, luaopen_zlib); lua_setfield(m_lua_state, -2, "zlib"); @@ -1661,10 +1667,11 @@ void lua_engine::periodic_check() msg.ready = 0; msg.done = 1; } +#if !defined(NO_LIBUV) auto loop = luv_loop(m_lua_state); if (loop!=nullptr) uv_run(loop, UV_RUN_NOWAIT); - +#endif } //------------------------------------------------- |
