add luasocket builtin to luaperks

This commit is contained in:
zeromus 2010-06-10 06:13:51 +00:00
parent bfd2e0d35a
commit 55daec3e57
2 changed files with 12 additions and 0 deletions

View File

@ -49,6 +49,10 @@ extern "C"
#ifdef WIN32
int iuplua_open(lua_State * L);
int iupcontrolslua_open(lua_State * L);
//luasocket
int luaopen_socket_core(lua_State *L);
int luaopen_mime_core(lua_State *L);
#endif
}
@ -4902,6 +4906,14 @@ int FCEU_LoadLuaCode(const char *filename, const char *arg) {
#if defined( WIN32) && !defined(NEED_MINGW_HACKS)
iuplua_open(L);
iupcontrolslua_open(L);
//luasocket - yeah, have to open this in a weird way
lua_pushcfunction(L,luaopen_socket_core);
lua_setglobal(L,"tmp");
luaL_dostring(L, "package.preload[\"socket.core\"] = _G.tmp");
lua_pushcfunction(L,luaopen_mime_core);
lua_setglobal(L,"tmp");
luaL_dostring(L, "package.preload[\"mime.core\"] = _G.tmp");
#endif
luaL_register(L, "emu", emulib); // added for better cross-emulator compatibility

Binary file not shown.