瀏覽代碼

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

Bart van Strien 14 年之前
父節點
當前提交
05c2749760
共有 1 個文件被更改,包括 2 次插入2 次删除
  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);