SELECT button on OUYA with xbox 360 controller does not read

Create issue
Issue #25 resolved
Seppi created an issue

I don't know if this is a OUYA issue, and Android issue, or a problem with love-android-sdl2, but I can't get the select button on an xbox 360 controller to work.

I don't have access to a controller that will bind with an android device, but I assume since OUYA runs android, it's a universal problem.

START works fine, interestingly enough (j:isDown(19))!

I can confirm that the select button works in love 0.9.0 on arch linux. (j:isDown(6) or j:isDown(7) on 0.9.1 with the index bug fix)

Here is the index bug fix I use for 0.9.0 to 0.9.1:

if love._version_minor == 9 and love._version_revision == 0 then 
  local mt = debug.getregistry()["Joystick"]

  local _isDown = mt.__index.isDown

  function mt.__index.isDown(self, ...)
    local args = {...}
    for i,v in ipairs(args) do
      args[i] = args[i] - 1
    end
    return _isDown(self, unpack(args))
  end
end

Attached is the joystick test I use for both platforms.

Comments (9)

  1. Martin Felis repo owner

    I do not have an OUYA and therefore cannot test it. Have you also tested it with the new Alpha8?

  2. Seppi reporter

    I've researched this and I figured it out!

    The select button on the xbox 360 controller can be read on the OUYA as love.keyboard.isDown("escape")

  3. Seppi reporter

    @MartinFelis

    To make it even more counter intuitive, it only happens for an instant.

    The only way to reliably read it is by using love.keypressed and storing the key in a cache if it shows up!

    For anyone interested, same thing on the PS3 controller!

  4. Log in to comment