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:
parent
8da0e47ae3
commit
0af33d0b3a
6 changed files with 70 additions and 58 deletions
|
|
@ -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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue