moonlight-stream / moonlight-ios

GameStream client for iOS/tvOS
GNU General Public License v3.0
1.17k stars 300 forks source link

[Request] Make up for missing buttons on MFI controllers #193

Open sean256 opened 8 years ago

sean256 commented 8 years ago

As a user who's on a non jail broken device, my best controller options are the one that conform to Apples specs. While some are quite good they lack a few buttons from the PC standard. It would be awesome to have either customizable onscreen buttons (I would only add 2 for example) or have the ability to map button combos to other buttons. Like maybe L1+A = L3.

Missing buttons are: select and the thumb stick buttons L3 and R3.

Some other ideas for a solution: -Holding a button for another -Light or hard press for something else (MFI requires button pressure) -Light press a trigger + another button

siliconkibou commented 8 years ago

Great idea...I second this suggestion.

sean256 commented 8 years ago

I checkout out the code and started to look through it with the idea of adding it myself and I found something surprising. Someone actually thought of this and added it in, but it doesn't quite work.

If you hit either LB or RB and the middle button at the exact same time it will do SELECT and SPECIAL. But when I say exact same time I mean that, it's really hard to use.

I'll keep pecking away at it but if someone more skilled wants to tackle it then great.

jpecih commented 8 years ago

I recommend using joytokey to remap missing buttons in streamer PC

reveriadive commented 8 years ago

JoyToKey would mean remapping every key to keyboard input. It also seems to not work with most games otherwise, well at least for me. If this was fully implemented though, I'd recommend L1/L2, and R1/R2 instead as they can be pressed without taking the fingers off the analog sticks.

genmatrix commented 6 years ago

@cgutman Did you happen to see how they added two new button mappings for iOS 12.1 (I believe L3 and R3)? I'm not 100% sure if it made it to the final version but they were in the beta for sure.

Edit: Found the Twitter link. https://twitter.com/stroughtonsmith/status/1042128909754617866/photo/1

mattbenic commented 6 years ago

That's great news. Would still need a method to support older controllers though. Apple haven't exactly helped make MFi controllers a must buy for most users, and I can't imagine too many existing owners would upgrade immediately

cgutman commented 6 years ago

Yep, this is awesome and should be trivial for us to add. I wonder if there's a new version of the MFi gamepad specification to match and how users will know the difference.

https://developer.apple.com/documentation/gamecontroller/gcextendedgamepad/3034770-leftthumbstickbutton

cgutman commented 6 years ago

Added support for the native buttons in 39b04d46a4e6f76b11fd5ef1c48a8948e566b197 but we still need a solution for tvOS where these buttons aren't present.

genmatrix commented 6 years ago

Awesome. I don't think there is any actual hardware out that has these buttons either, but finally a step in a better direction for controllers as a whole.

mattdreher commented 6 years ago

Awesome. I don't think there is any actual hardware out that has these buttons either, but finally a step in a better direction for controllers as a whole.

I saw this yesterday. https://toucharcade.com/2018/11/01/rotor-riot-controller/

siliconkibou commented 6 years ago

Awesome. I don't think there is any actual hardware out that has these buttons either, but finally a step in a better direction for controllers as a whole.

I saw this yesterday. https://toucharcade.com/2018/11/01/rotor-riot-controller/

That's awesome. Buying. Can't wait to see Moonlight and other support for these new controllers...it's been the only thing missing.

0vrlrd commented 6 years ago

I picked up the new Rotor Riot controller and built a copy of Moonlight from the master branch.

Unfortunately I wasn't able to get L3 and R3 to work. After some debugging, I don't think the buttons are even registering as present with GCExtendedGamepad. I have attached a screenshot of Thumbstickbuttons in the gamepad object.

My guess is either the gamepad isn't registering the buttons or iOS 12.1 still doesn't have full support yet.

Hopefully someone much smarter than me can figure this out once they get their hands on a controller.

Note: Yes I am using iOS 12.1, maybe I should be testing the beta for 12.1.1?

screen shot 2018-11-13 at 5 33 37 pm

mattbenic commented 6 years ago

Does the controller yet pass the correct values through to iOS? Maybe it needs a firmware update for that?

0vrlrd commented 6 years ago

Does the controller yet pass the correct values through to iOS? Maybe it needs a firmware update for that?

It would be odd for it not to have it since their website is very bold about support. I could try reaching out to their support and see what they say, but this is so new they probably don’t have any real response.

Any other ideas to try in the meantime?

From their website:

Having L3/R3 on MFI controllers finally opens the door for developers to port console and PC games to iOS without having to configure the game to use touch screen for these functions.

mattbenic commented 6 years ago

Ah yeah I see. I don't suppose there are any games/apps that support the thumbclicks yet to test that claim against?

As an ATV user I'm a bit disappointed to see it's a wired controller :/ Really nice design though!

Kiaos commented 6 years ago

Does anyone know if the rotor riot controller works yet. I've seen ps4 apps that are porting r3 and l3. So i'm wondering how much progress is done on the moonlight support for the extended mfi so far for it.

cgutman commented 6 years ago

v2.4.0 has the code that should support it but I haven't tested it as I don't have the hardware. It seems like @0vrlrd didn't have success though.

Do you have the hardware? Do you know of open-source apps that added support?

Kiaos commented 6 years ago

Im buying the the controller soon so I can play bo4 over the internet moonlight works like a dream with fps games when you have gigibit internet ive tried it accross town. So now the only thing missing from the experience is r3 for melee and l3 for sprint. So yea im gonna buy one I have a iPhone 7 Plus to test it. Im gonna test other apps too.

cgutman commented 6 years ago

I just got mine today and I can confirm on my iPhone SE on iOS 12.1 what @0vrlrd saw. It's not recognizing the L3/R3 buttons. I'm not sure if this needs some sort of whitelisting in iOS, a firmware update for the gamepad, or something else in Moonlight. I'll try to look more later today.

cgutman commented 6 years ago

I did more investigation. I added a few GC-related plist values (including some new ones in iOS 12.1), but that made no difference.

I also looked more in the debugger to see if I could find any indications that this gamepad was being properly recognized as a L3/R3 capable controller. Unfortunately, it looks to me like it's something wrong in iOS or the gamepad itself. The new HID profile with thumbstick buttons did not appear on the gamepad object nor did I get a valueChanged callback when I pressed the thumbstick buttons.

seansemperfi commented 5 years ago

Does anyone know if the rotor riot controller works yet. I've seen ps4 apps that are porting r3 and l3. So i'm wondering how much progress is done on the moonlight support for the extended mfi so far for it. I bought the rotor riot controller, and the joysticks do have the L3/R3 function, but unfortunately, most apps (including moonlight atm) have yet to introduce support for the L3/R3 functionality.

sethfowler commented 5 years ago

R-Play 1.9 just added support for the L3 and R3 buttons. I'm curious if that means that the buttons have finally been enabled. Rotor Riot apparently said that they were working with the R-Play developers at one point, so this R-Play update may be a good sign.

cgutman commented 5 years ago

They've already been working for a couple weeks in Moonlight, ever since Rotor Riot released the 1.0.3 firmware. We already had the code there to support it

sethfowler commented 5 years ago

That’s great to hear! I knew you had landed the code, but I wasn’t sure whether anyone had tested it with the updated firmware.

AramArzumanyan commented 5 years ago

Hi, is there any progress on the issue? Thanks.

euroclydon37 commented 5 years ago

So, today, Apple officially announced support for Xbox and Playstation controllers. This is huge.