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

applets/swkbd: Fix button order received from button_text #5362

Merged
merged 2 commits into from May 25, 2020
Merged

applets/swkbd: Fix button order received from button_text #5362

merged 2 commits into from May 25, 2020

Conversation

SutandoTsukai181
Copy link
Contributor

@SutandoTsukai181 SutandoTsukai181 commented May 24, 2020

Fixes #5359

If an app sends custom button texts, none of them should be empty. Leaving an empty element will mess with the index, causing the frontend to add the wrong button text. This can also be merged to citra-android as the issue is related to the core, not the frontend.

Working button text


This change is Reviewable

@wwylele
Copy link
Member

wwylele commented May 24, 2020

There are other possibility of how real 3DS works on this.

What we know as fact: The game uses config.button_text[0] and config.button_text[2] for the text of two buttons, skipping the index 1

Possible ways in which 3DS works:

@SutandoTsukai181
Copy link
Contributor Author

SutandoTsukai181 commented May 24, 2020

@wwylele Since the text is always based on button order, would an app send text in a reversed order depending on its region/language?

Also, the left button is "Cancel" and the right one is "Ok", but Citra always displays "Ok" as the left button (which is more convenient). Should this be changed?

Apps always return 3 strings, even if there is no custom text, so the index should be constant for each button.
@SutandoTsukai181
Copy link
Contributor Author

SutandoTsukai181 commented May 24, 2020

Will have to do the same thing in a separate PR for android, as this is based on frontend now.

@wwylele
Copy link
Member

wwylele commented May 24, 2020

would an app send text in a reversed order depending on its region/language?

That is technically possible, but I don't know if there is any game doing it.

I have no opinion on the bottom order on the frontend.

@SutandoTsukai181 SutandoTsukai181 changed the title applets/swkbd: Remove empty strings from button_text applets/swkbd: Fix button order received from button_text May 24, 2020
@wwylele
Copy link
Member

wwylele commented May 25, 2020

Since the android side is merged, I am merging this one as well.

@wwylele wwylele merged commit 028609d into citra-emu:master May 25, 2020
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants