add luasocket builtin to luaperks
This commit is contained in:
parent
bfd2e0d35a
commit
55daec3e57
|
@ -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
|
||||
|
|
BIN
vc/luaperks.lib
BIN
vc/luaperks.lib
Binary file not shown.
Loading…
Reference in New Issue