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

InputCommon: Clean up how numeric settings are handled. #7936

Merged
merged 1 commit into from Apr 9, 2019

Conversation

@jordan-woyak
Copy link
Member

jordan-woyak commented Mar 28, 2019

Cleaned up how ControllerEmu's number settings are handled. Values are no longer accessed through array offsets and It's just way less hacky overall.

Numeric settings can now have decimal places and I've added units of measure to the UI: https://i.imgur.com/gJgoQXb.png

I've since renamed the Center/Width/Height settings to "Vertical Offset"/"Total Yaw"/"Total Pitch".

I've eliminated the hidden magic values of the IR cursor.
Previously, the default value of 50 for IR Center/Width/Height mapped to hidden ideal angles and offsets for a specific game (Super Mario Galaxy 2, or whatever game the last developer touching the code likes).
The setting now directly controls the angles of rotation in degrees and vertical offset in centimeters.
The default values are now 10 cm, 15 deg, and 15 deg which produces about the same behavior as the old defaults.
Exposing the actual angle and offset should stop the constant tweaking of these underlying magic numbers.
Also, significantly different values will be needed for Skyward Sword which was the main inspiration for this change.

FYI: Clearing the number entry for any of these settings and hitting enter now loads the default value.

I've changed the Forward,Upright,Sideways Wii Remote radio buttons back into Upright and Sideways check boxes.
This is not only fewer widgets but also allows upright and sideways to be used at the same time which is a valid orientation. https://i.imgur.com/CctCC3d.png

@8times9

This comment has been minimized.

Copy link
Contributor

8times9 commented Mar 28, 2019

Maybe add a comment about upright and sideways Wiimotes being a valid orientation? If the checkboxes were changed to radio buttons once already, it might happen again in the future.

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:numeric-setting-cleanup branch from b5c722a to 7a86db2 Mar 28, 2019
@jordan-woyak

This comment has been minimized.

Copy link
Member Author

jordan-woyak commented Mar 28, 2019

Maybe add a comment about upright and sideways Wiimotes being a valid orientation? If the checkboxes were changed to radio buttons once already, it might happen again in the future.

I've added a comment in the code where the options are created.

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:numeric-setting-cleanup branch 2 times, most recently from 43746a4 to 3e5ca63 Mar 29, 2019
Copy link
Contributor

iwubcode left a comment

Still have yet to test but code wise it look great! LGTM

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:numeric-setting-cleanup branch 3 times, most recently from 7889d24 to bfe610a Mar 30, 2019
…measure to UI. Eliminate hidden magic values of the IR cursor.
@jordan-woyak jordan-woyak force-pushed the jordan-woyak:numeric-setting-cleanup branch from bfe610a to 5efb717 Apr 7, 2019
@JMC47

This comment has been minimized.

Copy link
Contributor

JMC47 commented Apr 9, 2019

@JMC47 JMC47 merged commit e10a472 into dolphin-emu:master Apr 9, 2019
10 checks passed
10 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-freebsd-x64 Build succeeded on builder pr-freebsd-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
@jordan-woyak jordan-woyak deleted the jordan-woyak:numeric-setting-cleanup branch Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.