1. rude
  2. love

Commits

Alex Szpakowski  committed 6c2a645

Fixed Joystick:isDown to accept 1-based instead of 0-based button indices

  • Participants
  • Parent commits 86e3639
  • Branches default

Comments (0)

Files changed (1)

File src/modules/joystick/sdl/wrap_Joystick.cpp

View file
 
 	std::vector<int> buttons;
 	for (int i = 2; i <= lua_gettop(L); i++)
-		buttons.push_back(luaL_checkint(L, i));
+		buttons.push_back(luaL_checkint(L, i) - 1);
 
 	luax_pushboolean(L, j->isDown(buttons));
 	return 1;