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

This commit is contained in:
Bart van Strien
2011-09-21 21:26:34 +02:00
parent dc873c24f0
commit 05c2749760
+2 -2
View File
@@ -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);