Created
August 6, 2015 02:24
-
-
Save robmiracle/762e46403020c34497d2 to your computer and use it in GitHub Desktop.
Code snippets for the Corona SDK Tutorial: Game controllers and axes (https://coronalabs.com/blog/2013/09/24/tutorial-controllers-and-axis)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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