mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Joysticks are supposed to be 1-indexed, even in the callbacks..
This commit is contained in:
@@ -108,8 +108,8 @@ namespace sdl
|
|||||||
return 4;
|
return 4;
|
||||||
case Event::TYPE_JOYSTICK_PRESSED:
|
case Event::TYPE_JOYSTICK_PRESSED:
|
||||||
case Event::TYPE_JOYSTICK_RELEASED:
|
case Event::TYPE_JOYSTICK_RELEASED:
|
||||||
lua_pushinteger(L, msg.joystick.index);
|
lua_pushinteger(L, msg.joystick.index+1);
|
||||||
lua_pushinteger(L, msg.joystick.button);
|
lua_pushinteger(L, msg.joystick.button+1);
|
||||||
return 3;
|
return 3;
|
||||||
case Event::TYPE_FOCUS:
|
case Event::TYPE_FOCUS:
|
||||||
lua_pushboolean(L, msg.focus.f);
|
lua_pushboolean(L, msg.focus.f);
|
||||||
|
|||||||
Reference in New Issue
Block a user