-
Notifications
You must be signed in to change notification settings - Fork 364
Gamepad agnostic start up and quit without KB/M #398
Description
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