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

Android: Change all AnalogInputs to just inputs #7683

Merged
merged 1 commit into from Jan 8, 2019

Conversation

4 participants
@zackhow
Copy link
Member

zackhow commented Jan 7, 2019

Android doesn't report values for the inputs generated by FullAnalogInput so
there isn't a reason to add them as such. This also avoids a bug(for android)
where if there are three inputs(say 12, 11, and 121), and you generate a FullAnalogInput
with 12/11 then it will create another input with the name 121 which can cause conficts
with the real 121 input. This is probably not an issue on PC since most Axis inputs
are named and not numbered.

I should also mention this fixes the accelerometer issues(Swing/Down) that android has had for the past few months.

AddInput(new Axis(_padID, ButtonManager::TRIGGER_L));
AddInput(new Axis(_padID, ButtonManager::TRIGGER_L));
AddInput(new Axis(_padID, ButtonManager::TRIGGER_R));
AddInput(new Axis(_padID, ButtonManager::TRIGGER_R));

This comment has been minimized.

@jordan-woyak

jordan-woyak Jan 7, 2019

Contributor

The triggers have been added twice. Same thing on the classic controller, guitar, and maybe others.

This comment has been minimized.

@zackhow

zackhow Jan 8, 2019

Member

Good catch, was a few of them.

@zackhow zackhow force-pushed the zackhow:removefullanalog branch from 69ebe0e to 917381a Jan 8, 2019

Android: Change all analoginputs to just inputs
Android doesn't report values for the inputs generated by FullAnalogInput so
there isn't a reason to add them as such. This also avoids a bug(for android)
where if there are three inputs(say 12, 11, and 121), and you generate a FullAnalogInput
with 12/11 then it will create another input with the name 121 which can cause conficts
with the real 121 input. This is probably not an issue on PC since most Axis inputs
are named and not numbered.

@zackhow zackhow force-pushed the zackhow:removefullanalog branch from 917381a to 02c649b Jan 8, 2019

@riking

This comment has been minimized.

Copy link
Contributor

riking commented Jan 8, 2019

note: This results in the Axis 3+- / Axis 3-+ inputs not being generated, correct? I think that's fine on Android

@zackhow

This comment has been minimized.

Copy link
Member

zackhow commented Jan 8, 2019

There isn't a +/- on android, it's just Axis 3

Ex:
Nunchuk/Stick/Up = Axis 203
Nunchuk/Stick/Down = Axis 204

So the end result would be Axis 2034

@jordan-woyak

This comment has been minimized.

Copy link
Contributor

jordan-woyak commented Jan 8, 2019

This is correct. The whole purpose of AddAnalogInputs is to support gamepad drivers that map a single "action" (usually an analog trigger press) across the entire range of an axis. The inputs that are supplied here on Android are created by us and known to be a single "action". AddAnalogInputs is poorly named and doesn't apply here.

@JosJuice JosJuice merged commit b30a338 into dolphin-emu:master Jan 8, 2019

9 checks passed

default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details

@zackhow zackhow deleted the zackhow:removefullanalog branch Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment