Code: Select all
function love.load()
android=love.joystick.getJoysticks()[1]
end
function love.draw()
love.graphics.print(android:getName(), 10, 10)
for i,v in ipairs({android:getAxes()}) do
love.graphics.print(i..': '..v,10,20 *i + 10)
end
love.graphics.print('Number of Buttons: '..android:getButtonCount(),100,100)
love.graphics.print('Number of Axis: '..android:getAxisCount(),100,120)
love.graphics.print('Number of Hats: '..android:getHatCount(),100,140)
love.graphics.print('Supports Vibration: '..tostring(android:isVibrationSupported()),100,160)
end
What do you guys get ?