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

Add support for built-in input profiles #9070

Merged
merged 2 commits into from Sep 19, 2020

Conversation

Techjar
Copy link
Contributor

@Techjar Techjar commented Sep 9, 2020

They exist in the sys directory with the same structure as the config directory. Also includes a profile for controller interface Wiimote with gyro-emulated IR.

@Techjar Techjar changed the title Add support for built-in profiles Add support for built-in input profiles Sep 9, 2020
@iwubcode
Copy link
Contributor

iwubcode commented Sep 9, 2020

Great! I know I've seen a lot of requests for this.

Should the IMU* values be surrounded by tick marks? (actually D-pad and battery too)

@Techjar
Copy link
Contributor Author

Techjar commented Sep 9, 2020

The UI generated this config, so I trust that it's valid and correct. I don't really understand the criteria for backticks, as it seems to work fine either way.

Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems good (untested)

Just one question: can users take a built-in profile, change something and then save it as their own modified profile? Disabling save/delete is one thing, but if this prevents saving modifications it might be something to look into.

@Techjar
Copy link
Contributor Author

Techjar commented Sep 9, 2020

Yes, changing the name to something other than the built-in one (it's an editable combo box) will re-enable the buttons.
Short video: https://qimg.techjargaming.com/v/1zSndoal.mp4

The check to disable the buttons is based on the underlying path, so if they are enabled then the file is for certain not in the sys directory.

@MayImilae
Copy link
Contributor

MayImilae commented Sep 13, 2020

Built-in is frankly, not great. But I can't really figure out any alternatives that do that while being short. So, I'd prefer "Dolphin Profile" instead, but that's longer. So, hmm. Well, if that fits, I'd prefer it. But built-in is fine, imo.


Also only sort of related but I'm very glad you only included a profile for Wii Remote with Motion Pointing. That's a genuinely very useful addon and it doesn't have any of the mapping subjectivity that comes with eeevvverythiing else. Nice! If you (or anyone else) ever want to expand this to default profiles for traditional gamepads, it's going to get messy.

@Techjar
Copy link
Contributor Author

Techjar commented Sep 15, 2020

There's no issue with length, since the combo box size is going to depend on the window size anyways. I'm just not sure how I feel about "Dolphin Profile". Seems a bit redundant doesn't it?

I think we could include default profiles for some common and non-messy stuff. XInput is a fixed set of buttons, so that's a good candidate for GC controller. Default mapping for gamepads to wiimote is something I'm not touching with a ten-foot pole, as those are far too game-specific. In any case, we can worry about that in a different PR.

@Techjar
Copy link
Contributor Author

Techjar commented Sep 16, 2020

I have changed the term to "Stock" in the UI, and made it translatable.

The actual profile names can't be made translatable without either A. ruining the simplicity of just putting files in the Sys directory or B. making modifications to the translation parser. I don't want to over-complicate or delay this PR, so I think it's okay if the profile names aren't translatable for now, while we work out the best way to handle that.

@MayImilae
Copy link
Contributor

MayImilae commented Sep 16, 2020

Alright, stock is fine. Another option would be "Included" or something, which is another route if you prefer that.


Regarding including more default mapping (again, this is not all that relevant to this PR, it's for future stuff I guess), I wasn't even really talking about the Xinput or Dinput issue. Even if we limit ourselves to only supporting Xinput controllers, including default mapping for gamecube and wii games is still very complex. From what I've seen, the GameCube alone has 4 different common mappings (though one of those is kind of bad), varying by personal choice and the necessities of certain titles. And the Wii... that's just a nightmare. While there are some commonalities in later Wii titles, for the most part 360 to Wii profiles have to be made unique for each and every game. Nightmare. IMO, I think it is very viable for us to ship the three major profiles for 360 to GameCube controller mapping, and perhaps classic controller as well since that one is actually easy. Just, please, for the love of all that is good and wholesome in the world, don't try to make default wii remote mappings!

EDIT: I created a list of the common mappings, I'll post it here too! https://hastebin.com/raw/arihuzezih

@Techjar
Copy link
Contributor Author

Techjar commented Sep 16, 2020

"Included" is what I thought of, but it sounded weird, so I dug through my thesaurus and came up with "Stock".

Yeah, like I said I'm not touching default wiimote mappings with a ten-foot pole. Classic controller makes enough sense though. However, I wasn't aware there was more than one way people map 360 to GC. It has basically all the same buttons, save for a left bumper and clicky sticks, along with the face button layout being different. I can't think of more than one sensible way to bind it.

@JosJuice
Copy link
Member

I personally map the face buttons A-B B-A X-Y Y-X to match the layout of most of Nintendo's consoles, since I'm very used to that layout. Some others map them A-A B-B X-X Y-Y because they're used to the Xbox layout or just want the button labels to match, and some others map them A-A B-X X-B Y-Y because this supposedly is the most spatially similar to the GameCube...

@jordan-woyak
Copy link
Member

I'm a B-X X-B person but I think when we do include an Xbox controller profile we should just match the letters.
Users that are smart enough to want X to be B should be smart enough to change it.
Users that are not smart enough to change it are probably not smart enough to know X means B.

@Techjar
Copy link
Contributor Author

Techjar commented Sep 17, 2020

Yeah, I was thinking about how to even name such profiles and I don't know how to make it not confusing, so I'm also in favor of only including a "matching labels" profile when we do that.

@MayImilae
Copy link
Contributor

I would really prefer to include all three. If we only ship one, then it's like we're saying it's the correct one, and I really don't like that. As for the naming, "Direct", "Nintendo" (or SNES if you prefer), and "Spatial" I think would work well.

@mbc07
Copy link
Contributor

mbc07 commented Sep 17, 2020

Perhaps "GameCube Controller with Xbox button layout", "GameCube Controller with Nintendo button layout" and "GameCube Controller with spatial button layout"? That got a bit long but I think it works, however it still doesn't make clear it's intended only for XInput devices, and I can't think of a good way to inform that...

@JMC47
Copy link
Contributor

JMC47 commented Sep 18, 2020

Is this more or less reviewed at this point?

@devinprater
Copy link

devinprater commented Sep 18, 2020 via email

@jordan-woyak jordan-woyak merged commit 3348e63 into dolphin-emu:master Sep 19, 2020
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants