Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code snippets for the Corona SDK Tutorial: Game controllers and axes (https://coronalabs.com/blog/2013/09/24/tutorial-controllers-and-axis)
local function onInputDeviceStatusChanged( event )
-- Handle the input device change
if ( event.connectionStateChanged ) then
print( event.device.displayName .. ": " .. event.device.connectionState, event.device.descriptor, event.device.type, event.device.canVibrate )
end
end
Runtime:addEventListener( "inputDeviceStatus", onInputDeviceStatusChanged )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.