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

Prevent raw Unicode control codes from showing on software keyboard applet. #3845

Merged
merged 27 commits into from
Nov 16, 2022

Conversation

lostromb
Copy link
Contributor

@lostromb lostromb commented Nov 13, 2022

There seems to be an internal formatting protocol with the real software keyboard involving Unicode control codes such as 0x13 (Device Control 3), which is used to influence the formatting somehow. However, just copying this string straight across to our software keyboard applets ends up showing ugly Unicode blocks with the raw control code.

Since we currently don't bother to handle these codes correctly (pending a more complete software keyboard applet), let's just strip these codes away before displaying them. This applies to any character under the "C0 Controls" table on the Unicode spec, including newlines, tabs, form feeds, etc.

Fixes corrupted prompts on Pokemon Scarlet / Violet.

Before
image

After
image

On Avalonia
image

Logan Stromberg and others added 22 commits December 23, 2021 16:48
…the software keyboard to prevent ugly unicode blocks from being shown on the UI.
@MutantAura MutantAura added gui Related to Ryujinx.Ui fix Fix something labels Nov 13, 2022
@lostromb lostromb changed the title Strip Unicode control codes from strings before showing on software keyboard applet. Prevent raw Unicode control codes from showing on software keyboard applet. Nov 13, 2022
Copy link
Member

@riperiperi riperiperi left a comment

Choose a reason for hiding this comment

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

LGTM

Ryujinx.Tests/HLE/SoftwareKeyboardTests.cs Show resolved Hide resolved
@marysaka marysaka merged commit 2c9ab5e into Ryujinx:master Nov 16, 2022
@lostromb
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something gui Related to Ryujinx.Ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants