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

Cleaned initialisation process

This commit is contained in:
Reuh 2015-08-22 20:37:45 +02:00
parent 8da0e47ae3
commit 0af33d0b3a
6 changed files with 70 additions and 58 deletions

View file

@ -156,5 +156,13 @@ int luaopen_hid_lib(lua_State *L) {
}
void load_hid_lib(lua_State *L) {
HIDUSER_EnableAccelerometer();
HIDUSER_EnableGyroscope();
luaL_requiref(L, "ctr.hid", luaopen_hid_lib, false);
}
void unload_hid_lib(lua_State *L) {
HIDUSER_DisableAccelerometer();
HIDUSER_DisableGyroscope();
}