 
       p.scale(ratio / AXIS_MAX)
 
-  states: ->
-    plugin?.joysticks
-
   status: ->
     plugin?.status
 
   update: ->
-    joysticks = JSON.parse(plugin.joysticksJSON())
+    if plugin.joysticksJSON
+      previousJoysticks = joysticks
+      joysticks = JSON.parse(plugin.joysticksJSON())
+
+    for controller in controllers
+      controller?.processEvents()
 
   joysticks: ->
     joysticks

  plugin = null
  AXIS_MAX = 32767
  DEAD_ZONE = AXIS_MAX * 0.2

  joysticks = []

  buttonMapping =
    "A": 1

    "HOME": 256
    "GUIDE": 256

    "TL": 512
    "TR": 1024

    "ANY": 0xFFFFFF

  displayInstallPrompt = (text, url) ->
