mirror of
https://github.com/PabloMK7/citra.git
synced 2025-12-16 04:08:48 +00:00
swkbd: Fix digit filter
The DIGIT filter was incorrectly implemented as preventing all digits. It actually limits the maximum digit count to max_digits, according to ctrulib and hardware testing.
This commit is contained in:
parent
eb0364dd5f
commit
05a82b15e6
2 changed files with 5 additions and 6 deletions
|
|
@ -47,8 +47,7 @@ struct KeyboardConfig {
|
|||
bool has_custom_button_text; /// If true, use the button_text instead
|
||||
std::vector<std::string> button_text; /// Contains the button text that the caller provides
|
||||
struct Filters {
|
||||
bool prevent_digit; /// Disallow the use of more than a certain number of digits
|
||||
/// TODO: how many is a certain number
|
||||
bool prevent_digit; /// Limit maximum digit count to max_digits
|
||||
bool prevent_at; /// Disallow the use of the @ sign.
|
||||
bool prevent_percent; /// Disallow the use of the % sign.
|
||||
bool prevent_backslash; /// Disallow the use of the \ sign.
|
||||
|
|
@ -68,7 +67,7 @@ enum class ValidationError {
|
|||
// Button Selection
|
||||
ButtonOutOfRange,
|
||||
// Configured Filters
|
||||
DigitNotAllowed,
|
||||
MaxDigitsExceeded,
|
||||
AtSignNotAllowed,
|
||||
PercentNotAllowed,
|
||||
BackslashNotAllowed,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue