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

[Android] Fixes a bunch of input bugs. #300

Merged
merged 1 commit into from May 30, 2014

Conversation

Sonicadvance1
Copy link
Contributor

Looking at the old code for the ButtonManager was a brainfsck. This fixes a ton of bugs I kept uncovering as I was moving along.

Fixes the gamepad configuration file being incorrect.
No longer treats touchscreen in a special way. Ends up as a regular device with a "Touchscreen" device name.
Was incorrectly converting a index from integer to ButtonType. Wouldn't work due to the addition of some unused(in JNI) enumerators in ButtonType.
Fixes an issue where a map had a key as an axis which was causing its binding to be overwritten for every axis that was used twice (eg main stick left and right);
Fixes Triggers not working at all.
Fixes DPad not working at all.
Fixes C-Stick only half working.
Removes touch screen specific nativelibrary types onTouchAxisEvent and onTouchEvent.

Adds a configuration version configuration option. Allows easy configuration overwriting if the options need to be changed during updating.

Supersedes github PR #291.

@Sonicadvance1 Sonicadvance1 changed the title [Android] Fix a bunch of input bugs. [Android] Fixes a bunch of input bugs. Apr 23, 2014
if(!file.exists())
final int CURRENT_VERSION = 1;
int ConfigVersion = Integer.decode(NativeLibrary.GetConfig("Dolphin.ini", "Android", "ConfigVersion", "0"));
if(ConfigVersion < CURRENT_VERSION)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Looking at the old code for the ButtonManager was a brainfsck. This fixes a ton of bugs I kept uncovering as I was moving along.

Fixes the gamepad configuration file being incorrect.
No longer treats touchscreen in a special way. Ends up as a regular device with a "Touchscreen" device name.
Was incorrectly converting a index from integer to ButtonType. Wouldn't work due to the addition of some unused(in JNI) enumerators in ButtonType.
Fixes an issue where a map had a key as an axis which was causing its binding to be overwritten for every axis that was used twice (eg main stick left and right);
Fixes Triggers not working at all.
Fixes DPad not working at all.
Fixes C-Stick only half working.
Removes touch screen specific nativelibrary types onTouchAxisEvent and onTouchEvent.

Adds a configuration version configuration option. Allows easy configuration overwriting if the options need to be changed during updating.

Supersedes github PR dolphin-emu#291.
@Sonicadvance1
Copy link
Contributor Author

Changed over to copying the GCPadNew configuration file every time.
It's not a user configurable file on Android, so this'll ensure the newest version in case of change, or configuration corruption which tends to happen on application crash.

@delroth
Copy link
Member

delroth commented Apr 24, 2014

It's not a user configurable file on Android, so this'll ensure the newest version in case of change, or configuration corruption which tends to happen on application crash.

Uh, how do you plan to handle controllers connected to an Android phone?

@Sonicadvance1
Copy link
Contributor Author

GCPadNew's configuration is a "virtual" device to be able to pull information ButtonManager and hav e touchscreen controls and gamepads merged in to one device.
Has to be done in a weird way since our ControllerInterface and Android's input have conflicting ideals.

@shuffle2
Copy link
Contributor

Herro, what is the deal with this old and crusty PR (which seems like it might be blocking further Android UI improvements)?

@Hydr8gon
Copy link
Member

It is kind of a pain to have this not merged yet, it's stopping me from finishing multitouch support because this commit will conflict with it, causing rebases one way or another.

@Sonicadvance1
Copy link
Contributor Author

I don't know why this isn't merged I suppose.

@shuffle2
Copy link
Contributor

@Sonicadvance1 ok...?

shuffle2 added a commit that referenced this pull request May 30, 2014
[Android] Fixes a bunch of input bugs.
@shuffle2 shuffle2 merged commit d020133 into dolphin-emu:master May 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants