                     @bindControl dstPort, dstDevice, dstButton, srcMapping["device"], srcMapping["button"]
         undefined
 
-    bindControl: (dstPort, dstDevice, dstButton, srcDevice, srcButton, unbindCallback) ->
+    bindControl: (dstPort, dstDevice, dstButton, srcDevice, srcButton) ->
         @unbindControl   dstPort, dstDevice, dstButton, srcDevice, srcButton
-        @bindInputDevice dstPort, dstDevice, dstButton, srcDevice, srcButton, unbindCallback
+        @bindInputDevice dstPort, dstDevice, dstButton, srcDevice, srcButton
 
     unbindControl: (dstPort, dstDevice, dstButton, srcDevice, srcButton) ->
         @dstUnbindCallbacks[dstPort][dstDevice][dstButton]?()

    getControl: (dstPort, dstDevice, dstButton) ->
        @controls[dstPort][dstDevice][dstButton]?["name"]

    bindInputDevice: (dstPort, dstDevice, dstButton, srcDevice, srcButton, unbindCallback) ->
        logger.info "Binding '#{srcButton}' of '#{srcDevice}' to '#{dstDevice}' on port #{dstPort}"
        unbindInputDevice = @getUnbindInputDeviceCallback dstPort, dstDevice, dstButton, srcDevice, srcButton, unbindCallback
        useInputDevice = @getUseInputDeviceCallback dstPort, dstDevice, dstButton
        @dstUnbindCallbacks[dstPort][dstDevice][dstButton] = unbindInputDevice
        @srcUnbindCallbacks[srcDevice][srcButton] = unbindInputDevice

        @srcUnbindCallbacks[srcDevice][srcButton] = null
        @controls[dstPort][dstDevice][dstButton] = null

    getUnbindInputDeviceCallback: (dstPort, dstDevice, dstButton, srcDevice, srcButton) ->
        self = @
        -> self.unbindInputDevice dstPort, dstDevice, dstButton, srcDevice, srcButton

    getUseInputDeviceCallback: (dstPort, dstDevice, dstButton) ->
        if dstDevice is "joypad"
