Commits

Bart van Strien committed ac84222

Joysticks are supposed to be 1-indexed, even in the callbacks..

  • Participants
  • Parent commits e685f56

Comments (0)

Files changed (1)

src/modules/event/sdl/wrap_Event.cpp

 			return 4;
 		case Event::TYPE_JOYSTICK_PRESSED:
 		case Event::TYPE_JOYSTICK_RELEASED:
-			lua_pushinteger(L, msg.joystick.index);
-			lua_pushinteger(L, msg.joystick.button);
+			lua_pushinteger(L, msg.joystick.index+1);
+			lua_pushinteger(L, msg.joystick.button+1);
 			return 3;
 		case Event::TYPE_FOCUS:
 			lua_pushboolean(L, msg.focus.f);