From 3a811376d974de519c4ef74dff3e5b8719468f4a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 26 Feb 2016 14:50:09 +0100 Subject: Made pnacl to compile (nw) --- src/emu/luaengine.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/emu/luaengine.cpp') 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 +#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 } //------------------------------------------------- -- cgit v1.2.3