Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movement keys #670

Open
6Flash9 opened this issue May 30, 2023 · 1 comment · May be fixed by #677
Open

Movement keys #670

6Flash9 opened this issue May 30, 2023 · 1 comment · May be fixed by #677

Comments

@6Flash9
Copy link

6Flash9 commented May 30, 2023

With joystick,Cant use movement keys in game but can use for navigation

@newhinton
Copy link

newhinton commented Jun 9, 2023

I would like to know this aswell.

There is:

if (controllerConfigsState.value[port]?.mergeDPADAndLeftStickEvents == true) {

But i dont know if that is actually what i want. Is there a way to send joystick-movements as dpad actions to a core (that does not use the joystick itself)? If not, im willing to take a shot at it, but i am not really sure where to start. Thanks!

Edit:

Forcing mergeDPADAndLeftStickEvents==true will allow the left pad to act as a joypad. Is there a way to expose this setting?

Edit2:

                var allowJoypad = controllerConfigsState.value[port]?.mergeDPADAndLeftStickEvents ?: false
                when(system.id) {
                    SystemID.NES -> allowJoypad = true
                    SystemID.SNES -> allowJoypad = true
                    SystemID.GENESIS -> allowJoypad = true
                    SystemID.GB -> allowJoypad = true
                    SystemID.GBC -> allowJoypad = true
                    SystemID.GBA -> allowJoypad = true
                    SystemID.NDS -> allowJoypad = true
                }

                if (allowJoypad) {

Inserting that snippet in the file linked above will make it work. The list above is probably not complete, but it should be safe for them to get merged inputs.

@newhinton newhinton linked a pull request Jun 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants