chiaki icon indicating copy to clipboard operation
chiaki copied to clipboard

Gamepad agnostic start up and quit without KB/M

Open Fredrum opened this issue 3 years ago • 6 comments

What platform does your feature request apply to? Choose one or more: Probably any non Android platform. Maybe only Linux derivatives.

Is your feature request related to a problem? Please describe. Iv'e had a request to add some more functionality to enable people to start up a session and Quit Chiaki when not using Keyboard+Mouse, and also not necessarily the DS4 controller either (which can emulate a mouse).

Describe the solution you'd like The minimum required I believe would be gamepad support in the Main startup Gui window. And Gamepad agnostic pad input to trigger a full chiaki app quit when in session.
Or maybe quitting should happen in two stages, Session first for opportunity to change 'Server' and then another quit for main window.

Describe alternatives you've considered Right now it's possible to do if you are running from desktop and with a DS4. But it would need to work with any Gamepad and also when using chiaki with 'chiaki -platform eglfs' fullscreen as they'd like to do.

Additional context Iv'e had a first look at how to do this but had some stumbling blocks and I'd also like some input and thoughts how best to do this so that it's more future proof and works with other platforms.

  • I tried to do ControllerManager::GetInstance() in mainwindow.cpp and then getting and using ctrl_mngr->OpenController(0). This seems to work pretty well and could be added to to be more safe/flexible.

  • The problem is that when the session starts it doesn't take over the controllers and/or the manager and I get no input. I have tried to shut them down in various ways before starting the session but Iv'e not had much luck with that yet.
    I'm wondering if controllers should be managed by the root qApp instead? Would that be a good solution or not?

  • How could Quitting be handled? If we assumed a modern controller as its a Playstation maybe using the Right stick-button + 'Moon'/'B' could work? That's very hard to do by mistake during play. Another idea would be to hold A+B down for say 3 seconds. That would let you quit even with something like a NES controller.

Cheers, Fred

Fredrum avatar Dec 11 '20 20:12 Fredrum

Controller support should not be anywhere outside the StreamWindow in the gui since the Qt gui really isn't meant to be used with a controller. Instead, it would make more sense to optimize the borealis version for the Switch to work nicer on Linux/BSD/... too.

thestr4ng3r avatar Dec 12 '20 09:12 thestr4ng3r

In the short term, an auto-connect feature would be great along with a controller based quit. That would ease support in things like retropie etc. At least a 'quit session/quit application' button combo.

domb84 avatar Dec 13 '20 16:12 domb84

In the short term, an auto-connect feature would be great along with a controller based quit. That would ease support in things like retropie etc. At least a 'quit session/quit application' button combo.

I've actually discovered the list and stream options now. Looking at the source code it looks like there is a wakeup option that hasn't been fully implemented? Is that the case? I'm just writing a bash script to launch using retropie but I can't wakt up the ps4 without using the Chiaki GUI as yet.

domb84 avatar Dec 13 '20 21:12 domb84

Ive just got a day job contract so will have much less time to contribute for a while. Id love to get stuck in and expand the borealis gui to the linux side too but it would take longer.

I can help patching something together for the rpi01 version only that helps on retropie.

Maybe auto login on device [0] ie the first playstation registered.

And hard quit on R3 + Moon/circle

On Dec 13, 2020, at 1:30 PM, domb84 [email protected] wrote:

In the short term, an auto-connect feature would be great along with a controller based quit. That would ease support in things like retropie etc. At least a 'quit session/quit application' button combo.

I've actually discovered the list and stream options now. Looking at the source code it looks like there is a wakeup option that hasn't been fully implemented? Is that the case? I'm just writing a bash script to launch using retropie but I can't wakt up the ps4 without using the Chiaki GUI as yet.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Fredrum avatar Dec 13 '20 21:12 Fredrum

Ive just got a day job contract so will have much less time to contribute for a while. Id love to get stuck in and expand the borealis gui to the linux side too but it would take longer. I can help patching something together for the rpi01 version only that helps on retropie. Maybe auto login on device [0] ie the first playstation registered. And hard quit on R3 + Moon/circle On Dec 13, 2020, at 1:30 PM, domb84 @.***> wrote: In the short term, an auto-connect feature would be great along with a controller based quit. That would ease support in things like retropie etc. At least a 'quit session/quit application' button combo. I've actually discovered the list and stream options now. Looking at the source code it looks like there is a wakeup option that hasn't been fully implemented? Is that the case? I'm just writing a bash script to launch using retropie but I can't wakt up the ps4 without using the Chiaki GUI as yet. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Turns out there is a CLI so I've built a rather rudimentary bash script that will discover the state of the ps4 and wake it up. Only thing I can't work out yet is how to populate the IP address automatically. Might us nmap or some such.

https://dominicbird.com/knowledge-base-2/emulation/compile-chiaki-and-add-as-a-custom-port-to-retropie/

domb84 avatar Dec 13 '20 22:12 domb84

Hi @domb84 I have made an issue on my fork for this retropie temp solution. We could continue talking there. I will post there for this temp fix.

https://github.com/Fredrum/chiaki/issues/4

Fredrum avatar Dec 13 '20 23:12 Fredrum