1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00

Renamed os.run to ctr.run ; added ctr.hid.read

All other HID functions no longer update inputs when they are called.
This commit is contained in:
Reuh 2015-08-20 14:05:56 +02:00
parent 036c0a03ce
commit 155a2e9805
4 changed files with 16 additions and 35 deletions

View file

@ -1,15 +1,21 @@
#include <3ds/types.h>
#include <3ds/services/apt.h>
#include <3ds/os.h>
#include <lua.h>
#include <lauxlib.h>
int load_os_lib(lua_State *L);
int load_gfx_lib(lua_State *L);
int load_news_lib(lua_State *L);
int load_ptm_lib(lua_State *L);
int load_hid_lib(lua_State *L);
static int ctr_run(lua_State *L) {
lua_pushboolean(L, aptMainLoop());
return 1;
}
static int ctr_time(lua_State *L) {
lua_pushinteger(L, osGetTime());
@ -18,6 +24,7 @@ static int ctr_time(lua_State *L) {
// Functions
static const struct luaL_Reg ctr_lib[] = {
{ "run", ctr_run },
{ "time", ctr_time},
{ NULL, NULL }
};
@ -43,6 +50,5 @@ int luaopen_ctr_lib(lua_State *L) {
}
void load_ctr_lib(lua_State *L) {
load_os_lib(L);
luaL_requiref(L, "ctr", luaopen_ctr_lib, 0);
}