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
|
|
@ -13,13 +13,17 @@ The `news` module.
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
bool initStateNews = false;
|
||||
|
||||
/***
|
||||
Initialize the news module.
|
||||
@function init
|
||||
*/
|
||||
static int news_init(lua_State *L) {
|
||||
newsInit();
|
||||
|
||||
if (!initStateNews) {
|
||||
newsInit();
|
||||
initStateNews = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -63,8 +67,10 @@ Disable the news module.
|
|||
@function shutdown
|
||||
*/
|
||||
static int news_shutdown(lua_State *L) {
|
||||
newsExit();
|
||||
|
||||
if (initStateNews) {
|
||||
newsExit();
|
||||
initStateNews = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -83,3 +89,10 @@ int luaopen_news_lib(lua_State *L) {
|
|||
void load_news_lib(lua_State *L) {
|
||||
luaL_requiref(L, "ctr.news", luaopen_news_lib, 0);
|
||||
}
|
||||
|
||||
void unload_news_lib(lua_State *L) {
|
||||
if (initStateNews) {
|
||||
newsExit();
|
||||
initStateNews = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue