Skip to content

Commit

Permalink
Added the hid.pos3d() function.
Browse files Browse the repository at this point in the history
hid.3d() was not possible. Sorry.
  • Loading branch information
firew0lf committed Aug 21, 2015
1 parent fd688d0 commit ff6aa8e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/hid.c
Expand Up @@ -130,6 +130,14 @@ static int hid_volume(lua_State *L) {
return 1;
}

static int hid_3d(lua_State *L) {
float slider = (*(float*)0x1FF81080);

This comment has been minimized.


lua_pushnumber(L, slider);

return 1;
}

static const struct luaL_Reg hid_lib[] = {
{ "read", hid_read },
{ "keys", hid_keys },
Expand All @@ -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 }
};

Expand Down

0 comments on commit ff6aa8e

Please sign in to comment.