Commits

Alex Szpakowski  committed 1b8dd5d

Changed Joystick:getID to be 1-based instead of 0-based

  • Participants
  • Parent commits a4940f2

Comments (0)

Files changed (1)

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

 int w_Joystick_getID(lua_State *L)
 {
 	Joystick *j = luax_checkjoystick(L, 1);
-	lua_pushinteger(L, j->getID());
+	lua_pushinteger(L, j->getID() + 1); // IDs are 1-based in Lua.
 	return 1;
 }