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

Added the hid.pos3d() function.

hid.3d() was not possible. Sorry.
This commit is contained in:
Firew0lf 2015-08-21 18:24:21 +02:00
parent fd688d0569
commit ff6aa8e497

View file

@ -130,6 +130,14 @@ static int hid_volume(lua_State *L) {
return 1;
}
static int hid_3d(lua_State *L) {
float slider = (*(float*)0x1FF81080);
lua_pushnumber(L, slider);
return 1;
}
static const struct luaL_Reg hid_lib[] = {
{ "read", hid_read },
{ "keys", hid_keys },
@ -138,6 +146,7 @@ static const struct luaL_Reg hid_lib[] = {
{ "accel", hid_accel },
{ "gyro", hid_gyro },
{ "volume", hid_volume },
{ "pos3d", hid_3d },
{ NULL, NULL }
};