mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-28 08:49:30 +00:00
Added some code
This commit is contained in:
parent
5f22a4008a
commit
03baa21c10
80 changed files with 36025 additions and 0 deletions
22
source/os.c
Normal file
22
source/os.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include <3ds.h>
|
||||
|
||||
#include <lua.h>
|
||||
|
||||
static int os_run(lua_State *L) {
|
||||
bool run = aptMainLoop();
|
||||
|
||||
lua_pushboolean(L, run);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void load_os_lib(lua_State *L) {
|
||||
lua_getglobal(L, "os");
|
||||
|
||||
lua_pushcfunction(L, os_run);
|
||||
lua_setfield(L, -2, "run");
|
||||
|
||||
lua_pop(L, 1);
|
||||
|
||||
return;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue