mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
22 lines
No EOL
287 B
C
22 lines
No EOL
287 B
C
#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;
|
|
} |