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

swkbd: Fix a bug where clicking Cancel hangs the game #5294

Merged
merged 2 commits into from May 4, 2020

Conversation

zhaowenlan1779
Copy link
Member

@zhaowenlan1779 zhaowenlan1779 commented May 1, 2020

The text is validated in Finalize. If the validation fails, an error is returned and the applet is not actually finalized. This can result in hangs.

This is usually not a problem as the frontend is expected to validate the text passed to Finalize. However, when the user clicked on Cancel, the text is ignored and the frontend won't do any validation. Therefore, we should skip the validation here as well.

Also fixed a potential data race. All these functions should now be called on the same thread


This change is Reviewable

The text is validated in `Finalize`. If the validation fails, an error is returned and the applet is not actually finalized. This can result in hangs.

This is usually not a problem as the frontend is expected to validate the text passed to `Finalize`. However, when the user clicked on `Cancel`, the text is ignored and the frontend won't do any validation. Therefore, we should skip the validation here as well.

Also fixed a potential data race. All these functions should now be called on the same thread
B3n30
B3n30 approved these changes May 1, 2020
src/citra_qt/applets/swkbd.h Outdated Show resolved Hide resolved
@Dragios
Copy link
Contributor

Dragios commented May 1, 2020

The moment I close the dialog via X button it will suddenly remove any input in the Nickname column as shown in red box even when there is words already previously saved.
Mii Maker

@Dragios
Copy link
Contributor

Dragios commented May 1, 2020

I am wondering if the X button should even be exist at all for HLE keyboard?
The first time you boot up the game Luxor, you are required to create a new profile, hence no cancel button in HLE keyboard. On real 3DS, you cannot even exit to the Home Menu, if the swkbrd is still active. But on HLE if you X out the dialog, it will reprompt again until you input something and hit OK (which is also fine I guess).

If we were to imitate as close to the actual 3DS behavior, the Close dialog button should be muted or not exist at all. Of course, this can be up for debate.
What are other developer's opinion on this?

Renamed the fields
Remove close button
@zhaowenlan1779
Copy link
Member Author

zhaowenlan1779 commented May 2, 2020

@Dragios Fixed. now the close button should be disabled.

Dragios
Dragios approved these changes May 3, 2020
Copy link
Contributor

@Dragios Dragios left a comment

LGTM

@B3n30 B3n30 merged commit 60669a7 into citra-emu:master May 4, 2020
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants