From 75eb34379ce9e823382eb26084655eeebd97a93c Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 26 Aug 2013 17:35:10 -0300 Subject: [PATCH] Changed Joystick:getID to be 1-based instead of 0-based --- src/modules/joystick/sdl/wrap_Joystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/joystick/sdl/wrap_Joystick.cpp b/src/modules/joystick/sdl/wrap_Joystick.cpp index 4aa547c85..156b2398f 100644 --- a/src/modules/joystick/sdl/wrap_Joystick.cpp +++ b/src/modules/joystick/sdl/wrap_Joystick.cpp @@ -53,7 +53,7 @@ int w_Joystick_getName(lua_State *L) 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; }