mistertest / xcloud-shield

Xcloud Beta Unofficial App for the Nvidia Shield Android TV. Playing Xbox Cloud Gaming directly on the box Nvidia Shield tv in the best way.
https://github.com/mistertest/xcloud-shield
GNU General Public License v3.0
216 stars 14 forks source link

Major issue with Controllers Xbox - when Multiple Controller connected #14

Open mistertest opened 2 years ago

mistertest commented 2 years ago

Hello every one, there is a major issue this last days, since 4 days or perhaps a week about Xbox controllers and possibly certain other controllers. Apparently my xbox one serie x controller don't work since few days like some users. I think, Xcloud has changing his code in the web app, but I'm not sure, I don't know why exactly for now , I will looking for solutions.

mistertest commented 2 years ago

But some controllers used for android/android TV and PC are working, like my "Logitech F710" and my Shield Controller last gen. So I preconise gamepads Moga, logitech, 8bitdo edition Xbox for now.

mistertest commented 2 years ago

Hi every body. Good news ! I have the trick for having xbox controllers working. I will publish the method in the wiki soon this week end.

adrienFR87 commented 2 years ago

Hello guys, I have the same issue with a Xbox official controller , the controller works fine in the shield Menu but it doesn't work in the Xcloud Beta 4.3 on games . Does by chance anyone know how to fix this ? Thanks

mistertest commented 2 years ago

Hello guys, I have the same issue with a Xbox official controller , the controller works fine in the shield Menu but it doesn't work in the Xcloud Beta 4.3 on games . Does by chance anyone know how to fix this ? Thanks

Hello, so I use this trick : In game , do a long press on the synch bluetooth button and the "menu" button (at the same time) during something about 3 seconds and you'll see the controller interact in game. After that, it's always working, it's not necessary to apply this any time apparently. Confim me if it will working for you. Thanks.

mistertest commented 2 years ago

image

adrienFR87 commented 2 years ago

Thanks for your quick reply.

I tried your solution several times . When I pushed the BT button + Home Button ( 3sec in the same time) it opens me the side window on the right for Bluetooth pairing, then I validate the paring but it still not working on my side 👍

Thanks for all your help 👍

mistertest commented 2 years ago

It's not home button (xbox icon led ) but Menu button or "Hamburger menu" button. So Menu button + Synch button. Just like the image I posted.

mistertest commented 2 years ago

When you hold the right buttons, you don't exit the app. The xbox led icon will flash and stabilize. In any case that's how I was able to reactivate my controller with the app

adrienFR87 commented 2 years ago

Yes it's what I did , sorry I confused the home button with that hamburger menu , I pushed the hamburger menu button 👍

adrienFR87 commented 2 years ago

On my side the Xbox button flash and don't stabilize.

mistertest commented 2 years ago

Yes it's what I did , sorry I confused the home button with that hamburger menu , I pushed the hamburger menu button 👍

Ah OK, no worries. Yes it is clearer. You can try to keep pressing until the led button changes flashing rate or stabilizes. For my part, I would do some tests tonight by trying to reproduce the trick by uninstalling the controller and reconnecting it.

Razzly commented 2 years ago

Hi,

Unfortunatelly i have same problem. No matters how long i keep pushing sync and "humburger" nothing is changing. No response. Pushing again changes flashing to slower and prompt pops up to pair xbox pad again, but again no luck.

I tested this on 2 devices: Nvidia shield tv pro and switch running linageos. Same thing.

Sideloaded xbox game pass works but quality is way worse then through your app :( Xcloud as service is such a hit and miss...

Edit: I've also tested ps4 controllers (3 different ones) and same problem. Working on game select ion, not working in game.

mistertest commented 2 years ago

Hi guys. I manage to reproduce the bug, and obviously my shield does not recognize the two controllers at the same time. My shield controller must be disconnected or inactive for several minutes, so that the xbox controller can be playable in game. So the bug occurs when there are other peripherals connected to the box. I would have to manage to deactivate the unwanted controllers to activate the one with which we want to play. Something like that. Unfortunately I have a new job that is taking a lot of time and energy, so I am seriously considering opening the code to allow other interested developers to help me solve these problems.

mistertest commented 2 years ago

I confirm that when I delete my shield controller and that it is no longer associated with the box. My xbox controller is directly recognized in the game without any problem. So there is indeed a conflict when several controllers are connected to the box. Can you confirm that this is also the case for you? Thanks in advance.

Razzly commented 2 years ago

Hi,  Nope. I removed all other controllers. I even removed any other USB devices i had in ports. Surprisingly there is one case when all is working. It on switch with linageos.  When i use it in handheld mode with joycons connected all is working with no problem.  I also tested xcloud on Sideloaded chrome and brave. Same thing. Still plan to test switch pro controller. Joycons connected via bluetooth are not really working at all (could not connect them reliably so far, they keep disconnecting). Im determined to test every posibility and I'll let you know if i find anything of value. So far it seems like there is some hardcoded block to send xinput over to stream. PS. Sideloaded Xbox game pass app is working with all of the controllers, but quality is terrible... 

Razzly commented 2 years ago

Ok. I got a breaktrough.

Just checked again and i tried to keep button pressed (A button) when lunching stream. And it worked. I need few more testing but there is some hope

mistertest commented 2 years ago

Thanks for your precious help Razzly. Yes I need volunteer testers, to help me solve the problems. But to see it more clearly, currently you are not testing on the shield tv but on another device: the Nintendo Switch with android and joycons ? Is that the case?

Razzly commented 2 years ago

No im testing it on shield tv pro right now.

And its working... So here is my process:

  1. removed all things connected to USB ports
  2. Clear memory and cache for app
  3. Unpair all controllers
  4. Go into app using shield remote
  5. Log in and select game, then lunch it
  6. Once in game double tap "hamburger" button on shield remote to launch menu
  7. Navigate to pair ing and connect xbox controller
  8. Nothing. Tried sync+"hamburger" button on controller. It started flashing but nothing happened.
  9. Pushed sync+"hamburger", controller started to flash slower and it stabilized after a moment.
  10. Stil no luck, so I went back to game selection menu.
  11. Then i lunch title again but this time i presses A button once xbox logo showed up and kept it pressed till im back in game
  12. Controller works...
  13. Profit...?

I've now gradually connected USB devices. USB storege - still working USB keyboard - not working again (will try External Keyboard Helper that was explained here later)

mistertest commented 2 years ago

@Razzly, I will be testing your process tonight. But I really want to embed real custom mapping for controllers right into the app. And also the possibility of deactivating / Activating certain Game controllers to avoid conflicts. I will test a lot of things that go in this direction for the next version

Razzly commented 2 years ago

@mistertest that would be great feature. Let me know if i can help you in anything. Im only junior dev in JS but maybe there is something that i can help with :)

mistertest commented 2 years ago

@Razzly Thank you very much, it's great.

This is the code base that I will start from for identifying the controller , apply a mapping and making somes conditionals things

  public ArrayList<Integer> getGameControllerIds() {
        ArrayList<Integer> gameControllerDeviceIds = new ArrayList<Integer>();
        int[] deviceIds = InputDevice.getDeviceIds();
        for (int deviceId : deviceIds) {
            InputDevice dev = InputDevice.getDevice(deviceId);
            int sources = dev.getSources();

            // Verify that the device has gamepad buttons, control sticks, or both.
            if (((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
                    || ((sources & InputDevice.SOURCE_JOYSTICK)
                    == InputDevice.SOURCE_JOYSTICK)) {
                // This device is a game controller. Store its device ID.
                if (!gameControllerDeviceIds.contains(deviceId)) {
                    gameControllerDeviceIds.add(deviceId);
                }
            }
        }
        return gameControllerDeviceIds;
    }
Razzly commented 2 years ago

Looks promising. With array of deviceid you can let user select which to use. Its in java, right?

mistertest commented 2 years ago

@Razzly Yes it is in java and despite appearances and that I created this application I am a beginner in java. The positive thing is that with such an application I am progressing enormously.

Razzly commented 2 years ago

@mistertest I know :) I started as junior dev in my work this year and its huge learning curve, but i leared a lot as well :D

Next week ill try to lunch your code on my pc with couple of peripherals and pads connected. Im curious of results :)

mistertest commented 2 years ago

@Razzly Good news. I coded all night long with a lot of testing on the tv shield. I can more working at night because the Nvidia shield is used all day by my family in the living room. So I have made very good progress on the subject. My code will give priority to the xbox controllers when connecting. That is, if my shield or other non-xbox controllers are connected, their xinput system in the game will be disabled and only the xinput of the xbox controller will work in the game if it is connected. The shield gamepad will still work for navigation on the Android operating system but not in the game. Once the xbox is disconnected, the shield gamepad becomes usable again in the game. After several tests at home, the process automatically works very well. Now I have to confirm with the beta testers and you will be the first to test this. So I will publish a test version and give you the link in a few minutes. I think I will optimize the code further and the other good news is that I am also very close to succeeding in an integrated mapping of the select button, to be able to do without the EKH keyboard helper.

Razzly commented 2 years ago

@mistertest Sure thing. I can test it :) You can send me apk through email (gunshin@o2.pl) or in github.

mistertest commented 2 years ago

@Razzly I have a folder for Testing version. So the app is here : https://github.com/mistertest/xcloud-shield/tree/master/version_test

Razzly commented 2 years ago

@mistertest No change in test app. If i connect my keyboard then xbox controller wont work in game. I still need to test this config: no keyboard + xbox controller + ps4 pad and see if it will use xbox over ps4.

FYI, i have this thing as keyboard: https://www.amazon.com/Universal-Wireless-Keyboard-Connection-Projector/dp/B07WRZNW6X

mistertest commented 2 years ago

Ah ok you have an unofficial keyboard remote. I have not tested for these configuration. Only with my Xbox One series x controllers, my shield controller and the shield remote control.

Razzly commented 2 years ago

@mistertest no keyboard + xbox controller + ps4 pad - works, In game select ion both are functional, but in game only xbox works

No keyboard + no xbox + ps4 pad - ps4 pad works both in game and in game selection

mistertest commented 2 years ago

@Razzly Cool. Yes the priority is for Xbox anyway. So you will have to choose whether you want to play with your PS4 or your Xbox and you will have to disconnect your Xbox controller when you want to play with your PS4 controller. And finally it's normal, playing Xbox games with an xbox controller, it doesn't shock me and bother me, it's quite logical, so it's fine like that.

Razzly commented 2 years ago

@mistertest Yeah i know its unofficial. I use it mostly to log in gefoce now (for some reason there is no onboard keyboard when they prompt to log in to ubisoft or origin) and to use vanced YouTube app, plus few retro emulators.

mistertest commented 2 years ago

@Razzly Now I need to do something about the physical keyboards and unofficial remotes. And some of them are recognized as controllers and not keyboards . So it will be necessary to make a distinction between the two and conditions

mistertest commented 2 years ago

For geforce Now you can use only your controller, just push "start " and you have the virtual keyboard and mouse for login, and navigate.

mistertest commented 2 years ago

@Razzly A long press "Start" you'll see the virtual Keyboard menu and you can dirigate a virtual mouse with the stick.

mistertest commented 2 years ago

@Razzly For Youtube I have a better choice of App totally used for Android TD with gamepad and remote. With no ads publicity videos. And open source.

Razzly commented 2 years ago

@mistertest Thanks I'll try that :)

On The other topic let me ask one thing. Are you also have such bad compression artifact while using xcloud?

Official xbox app its so bad its unbearable. In your app its a lot better but still there are artifacts. Even in games that are clearly on these new Series x rigs which were supposed to be 1080p.

And for YouTube what do you use?

mistertest commented 2 years ago

@Razzly This is the youtube app than I use on my shield Android TV. No Adds videos https://smartyoutubetv.github.io

mistertest commented 2 years ago

@mistertest Thanks I'll try that :)

On The other topic let me ask one thing. Are you also have such bad compression artifact while using xcloud?

Official xbox app its so bad its unbearable. In your app its a lot better but still there are artifacts. Even in games that are clearly on these new Series x rigs which were supposed to be 1080p.

And for YouTube what do you use?

For me the experience is Awesome now in France, no artifacts with my app. But I prefer to play Xcloud on my shield because on PC the artifacts and pixelisation are more present. I don't why but for now on the shield I have the better experience.

mistertest commented 2 years ago

@Razzly The github page of Skytube is here : https://github.com/yuliskov/SmartTubeNext
You'll have to install the new version when you'll see the come back of adds commercials videos.

Razzly commented 2 years ago

@mistertest Got it. Thanks of all your help. Let me know if you need any help in future. My discord is gunshin#0684 or mention me in github :)

mistertest commented 2 years ago

@Razzly Yes thank you too. I will certainly making some work and need somes tests next days. But it's cool to having the biggest issue with controllers resolved. So I will optimise the code and publish the new version this week.

mistertest commented 2 years ago

Hello everyone the Xcloud shield Version 4.4 is out with the new features : Priority of Xbox controllers and Multi-connect support. https://github.com/mistertest/xcloud-shield/releases/tag/version_4.4

Muttgutt99 commented 2 years ago

I get an error message when sideload on downloader. Error:URL needs authorization. This is not supported

Please advise

mistertest commented 2 years ago

I get an error message when sideload on downloader. Error:URL needs authorization. This is not supported

Please advise

Hello @Muttgutt99 . I don't use Downloader, I use "X-plore" with Google drive or "send files". This error about Downloader is concern Downloader only not the app.

https://www.addictivetips.com/media-streaming/fix-downloader-error-firestick/