mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
ADDED SOCKETS ! Added ROMFS support (maybe), Improved the news library, added a VBLank waiting function
Sockets are only very buggy/unstable TCP clients, but working. The library was written from scratch.
This commit is contained in:
parent
dcdeec6525
commit
8500bcb8fa
7 changed files with 222 additions and 16 deletions
|
|
@ -33,17 +33,13 @@ Send a notification to the user. WIP, do not use !!!
|
|||
static int news_notification(lua_State *L) {
|
||||
const char *title = luaL_checkstring(L, 1);
|
||||
const char *message = luaL_checkstring(L, 2);
|
||||
const void *imageData = luaL_optstring(L, 3, NULL);
|
||||
|
||||
u32 imageDataLength = 0;
|
||||
const void *imageData = luaL_optlstring(L, 3, NULL, (size_t*)&imageDataLength);
|
||||
bool jpeg = false;
|
||||
if (lua_isboolean(L, 4))
|
||||
jpeg = lua_toboolean(L, 4);
|
||||
|
||||
u32 imageDataLength = 0;
|
||||
if (imageData) {
|
||||
lua_len(L, 3);
|
||||
luaL_checkinteger(L, -1);
|
||||
}
|
||||
|
||||
const u16* cTitle = 0;
|
||||
const u16* cMessage = 0;
|
||||
u32 titleLength, messageLength;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue