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

Allow using shoulder/trigger buttons on the Xbox 360 controller #28

Open
maxigaz opened this issue Jun 25, 2016 · 2 comments
Open

Allow using shoulder/trigger buttons on the Xbox 360 controller #28

maxigaz opened this issue Jun 25, 2016 · 2 comments

Comments

@maxigaz
Copy link

maxigaz commented Jun 25, 2016

I’ve been playing Aquaria OSE 1.002 with my wireless Xbox 360 controller under Manjaro Linux, and so far I prefer playing it this way. (For me, moving around is better with the analogue stick than with the keyboard and mouse, and rumble support is the cherry on the cake.)

However, unlike in the proprietary version 1.1.3 (downloaded from GOG.com), the shoulder and trigger buttons can’t be used at all. Without the open source patch, the right shoulder button is at least automatically set to function the same way as the right mouse button, although this button can’t be mapped to anything else in the options menu.

After a little search, I’ve found this page. I’m wondering if the situation has changed since.

@fgenesis
Copy link
Member

Ah, right. the sales version uses SDL1.2 which detects button input differently it seems.
Since i wanted to rework parts of the controller support code anyway, i'll give this a shot later today.
(I have an xbox360 controller so testing is no prob)

And i kinda forgot about the linked post, thanks for the reminder.

@fgenesis
Copy link
Member

Little update: turns out this is more complicated than i thought. Maybe i misunderstood how to setup the SDL2 gamecontroller config, but i started poking at it and it fell apart. Like you knock against the front door of a house, and the roof comes crashing down, followed by the walls, and in the end you notice that the house was in fact a sand castle held together by duct tape in a rising flood. Except that there was in fact no duct tape at all, but a thin layer of spray paint, forming the letters "working fine". TL;DR i'm having fun™ with this code.

Anyway, i'm somewhere in the middle of a big refactor that should fix more issues, e.g. not being able to use special keys like PgUp/PgDown; get rid of problems with non-english keyboard layouts, make form hotkeys configurable, controller hotplugging+autodetection, and multiple input sets. Pretty much most of that linked forum post, and things i considered doing since long but so far hadn't the courage to touch.
That will break usersettings.xml compatibility, but considering the possible improvements it's totally worth it. Will take a while either way.

(If this works out as i'm thinking i might end up accidentally adding theoretical local multiplayer support...)

fgenesis added a commit that referenced this issue Jul 13, 2016
- Support joystick hotplugging
- Support axes as buttons (means xbox360 shoulder triggers can be used as buttons)
- Show pretty joystick axis & button names if possible
- Tabify input actions UI
- Add 'mouse' column to input actions UI
- Allow to configure form hotkeys
- Allow ALL keys, get rid of internal key remapping
- SDL2: Use scancodes instead of keycodes since they are layout independent
- Allow extra mouse buttons (if present)
- Remove "lmbd" & "lmbu" actions in favor of "PrimaryAction" & "SecondaryAction"
  Makes the configuration less redundant and doesn't send each action twice,
  which happened if both were set to the same key.
- Fix Regressions from prev commits (menu not opening on Esc)

Still has a few minor bugs/issues that need to be fixed,
but pushing this now before the commit gets too large again.
@fgenesis fgenesis added this to the Next release (OSE 1.003) milestone Jul 14, 2016
fgenesis added a commit that referenced this issue Jan 12, 2021
The config format has slightly changed after merging the controllerfixup branch,
therefore it's better to have this reference file somewhere.
An old config should import cleanly, but in case it doesn't, this will do.

At this point we can close #28.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants