mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Added SSL support to sockets, Added console/stdout support, Removed apt.init/apt.shutdown, Added some SSL options to httpc
The console can __not__ be used with gfx.start() on a screen. You don't have to gfx.render() while print()ing, but you should do it when you are in the main loop. The SSL sockets don't work with Citra.
This commit is contained in:
parent
e87651a404
commit
e7ff54d58c
9 changed files with 333 additions and 75 deletions
|
|
@ -14,13 +14,17 @@ Used to get some user config.
|
|||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
|
||||
bool initStateCFGU = false;
|
||||
|
||||
/***
|
||||
Initialize the CFGU module.
|
||||
@function init
|
||||
*/
|
||||
static int cfgu_init(lua_State *L) {
|
||||
cfguInit();
|
||||
|
||||
if (!initStateCFGU) {
|
||||
cfguInit();
|
||||
initStateCFGU = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -29,8 +33,10 @@ Disable the CFGU module.
|
|||
@function shutdown
|
||||
*/
|
||||
static int cfgu_shutdown(lua_State *L) {
|
||||
cfguExit();
|
||||
|
||||
if (initStateCFGU) {
|
||||
cfguExit();
|
||||
initStateCFGU = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -309,3 +315,10 @@ int luaopen_cfgu_lib(lua_State *L) {
|
|||
void load_cfgu_lib(lua_State *L) {
|
||||
luaL_requiref(L, "ctr.cfgu", luaopen_cfgu_lib, false);
|
||||
}
|
||||
|
||||
void unload_cfgu_lib(lua_State *L) {
|
||||
if (initStateCFGU) {
|
||||
initStateCFGU = false;
|
||||
cfguExit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue