mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
23 lines
No EOL
323 B
C
23 lines
No EOL
323 B
C
#include <3ds/types.h>
|
|
#include <3ds/services/apt.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;
|
|
} |