Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
12cbacffca | ||
|
437c78e198 |
@@ -544,7 +544,7 @@
|
|||||||
"SwkbdMinCharacters": "Must be at least {0} characters long",
|
"SwkbdMinCharacters": "Must be at least {0} characters long",
|
||||||
"SwkbdMinRangeCharacters": "Must be {0}-{1} characters long",
|
"SwkbdMinRangeCharacters": "Must be {0}-{1} characters long",
|
||||||
"SoftwareKeyboard": "Software Keyboard",
|
"SoftwareKeyboard": "Software Keyboard",
|
||||||
"SoftwareKeyboardModeNumbersOnly": "Must be numbers only",
|
"SoftwareKeyboardModeNumeric": "Must be 0-9 or '.' only",
|
||||||
"SoftwareKeyboardModeAlphabet": "Must be non CJK-characters only",
|
"SoftwareKeyboardModeAlphabet": "Must be non CJK-characters only",
|
||||||
"SoftwareKeyboardModeASCII": "Must be ASCII text only",
|
"SoftwareKeyboardModeASCII": "Must be ASCII text only",
|
||||||
"DialogControllerAppletMessagePlayerRange": "Application requests {0} player(s) with:\n\nTYPES: {1}\n\nPLAYERS: {2}\n\n{3}Please open Settings and reconfigure Input now or press Close.",
|
"DialogControllerAppletMessagePlayerRange": "Application requests {0} player(s) with:\n\nTYPES: {1}\n\nPLAYERS: {2}\n\n{3}Please open Settings and reconfigure Input now or press Close.",
|
||||||
|
@@ -136,10 +136,10 @@ namespace Ryujinx.Ava.UI.Controls
|
|||||||
string localeText;
|
string localeText;
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case KeyboardMode.NumbersOnly:
|
case KeyboardMode.Numeric:
|
||||||
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeNumbersOnly);
|
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeNumeric);
|
||||||
validationInfoText = string.IsNullOrEmpty(validationInfoText) ? localeText : string.Join("\n", validationInfoText, localeText);
|
validationInfoText = string.IsNullOrEmpty(validationInfoText) ? localeText : string.Join("\n", validationInfoText, localeText);
|
||||||
_checkInput = text => text.All(char.IsDigit);
|
_checkInput = text => text.All(NumericCharacterValidation.IsNumeric);
|
||||||
break;
|
break;
|
||||||
case KeyboardMode.Alphabet:
|
case KeyboardMode.Alphabet:
|
||||||
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeAlphabet);
|
localeText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.SoftwareKeyboardModeAlphabet);
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
Default = 0,
|
Default = 0,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Only numbers allowed.
|
/// Only 0-9 or '.' allowed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
NumbersOnly = 1,
|
Numeric = 1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Only ASCII characters allowed.
|
/// Only ASCII characters allowed.
|
||||||
|
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||||
|
{
|
||||||
|
public static partial class NumericCharacterValidation
|
||||||
|
{
|
||||||
|
public static bool IsNumeric(char value)
|
||||||
|
{
|
||||||
|
Regex regex = NumericRegex();
|
||||||
|
|
||||||
|
return regex.IsMatch(value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedRegex("[0-9]|.")]
|
||||||
|
private static partial Regex NumericRegex();
|
||||||
|
}
|
||||||
|
}
|
@@ -154,6 +154,28 @@ namespace Ryujinx.HLE.HOS.Services.Audio
|
|||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandCmif(8)] // 16.0.0+
|
||||||
|
// GetWorkBufferSizeExEx(OpusParametersEx) -> u32
|
||||||
|
public ResultCode GetWorkBufferSizeExEx(ServiceCtx context)
|
||||||
|
{
|
||||||
|
// NOTE: GetWorkBufferSizeEx use hardcoded values to compute the returned size.
|
||||||
|
// GetWorkBufferSizeExEx fixes that by using dynamic values.
|
||||||
|
// Since we're already doing that, it's fine to call it directly.
|
||||||
|
|
||||||
|
return GetWorkBufferSizeEx(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
[CommandCmif(9)] // 16.0.0+
|
||||||
|
// GetWorkBufferSizeForMultiStreamExEx(buffer<unknown<0x118>, 0x19>) -> u32
|
||||||
|
public ResultCode GetWorkBufferSizeForMultiStreamExEx(ServiceCtx context)
|
||||||
|
{
|
||||||
|
// NOTE: GetWorkBufferSizeForMultiStreamEx use hardcoded values to compute the returned size.
|
||||||
|
// GetWorkBufferSizeForMultiStreamExEx fixes that by using dynamic values.
|
||||||
|
// Since we're already doing that, it's fine to call it directly.
|
||||||
|
|
||||||
|
return GetWorkBufferSizeForMultiStreamEx(context);
|
||||||
|
}
|
||||||
|
|
||||||
private static int GetOpusMultistreamDecoderSize(int streams, int coupledStreams)
|
private static int GetOpusMultistreamDecoderSize(int streams, int coupledStreams)
|
||||||
{
|
{
|
||||||
if (streams < 1 || coupledStreams > streams || coupledStreams < 0)
|
if (streams < 1 || coupledStreams > streams || coupledStreams < 0)
|
||||||
|
@@ -90,9 +90,9 @@ namespace Ryujinx.Ui.Applet
|
|||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case KeyboardMode.NumbersOnly:
|
case KeyboardMode.Numeric:
|
||||||
_validationInfoText += "<i>Must be numbers only.</i>";
|
_validationInfoText += "<i>Must be 0-9 or '.' only.</i>";
|
||||||
_checkInput = text => text.All(char.IsDigit);
|
_checkInput = text => text.All(NumericCharacterValidation.IsNumeric);
|
||||||
break;
|
break;
|
||||||
case KeyboardMode.Alphabet:
|
case KeyboardMode.Alphabet:
|
||||||
_validationInfoText += "<i>Must be non CJK-characters only.</i>";
|
_validationInfoText += "<i>Must be non CJK-characters only.</i>";
|
||||||
|
Reference in New Issue
Block a user