Browse Source

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

Bart van Strien 14 years ago
parent
commit
05c2749760
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/modules/event/sdl/wrap_Event.cpp

+ 2 - 2
src/modules/event/sdl/wrap_Event.cpp

@@ -108,8 +108,8 @@ namespace sdl
 			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);